49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Test before pr merge
|
|
run-name: Test before pr merge
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
jobs:
|
|
test-lint:
|
|
runs-on: [ runner ]
|
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
|
steps:
|
|
- name: Clone Repository
|
|
uses: https://github.com/actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
|
|
|
- name: Installing black
|
|
run: python3.12 -m pip install black
|
|
|
|
- name: Checking black
|
|
run: python3.12 -m black src --check
|
|
|
|
test:
|
|
runs-on: [ runner ]
|
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
|
steps:
|
|
- name: Clone Repository
|
|
uses: https://github.com/actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
|
|
|
- name: Setting up Python 3.12
|
|
shell: bash
|
|
run: |
|
|
python3.12 -m venv venv
|
|
source venv/bin/activate
|
|
bash ./install.sh
|
|
bash ./install.sh -dev
|
|
|
|
- name: Testing with pytest
|
|
shell: bash
|
|
run: |
|
|
source venv/bin/activate
|
|
python3.12 -m pytest |