Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATP v3 update #105

Merged
merged 13 commits into from
Oct 13, 2023
34 changes: 25 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
python-version: [ '3.9', '3.10', 'pypy3.9' ]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -32,20 +32,36 @@ jobs:
isort --profile black .
black .
flake8 .
- name: Install Python Poetry
uses: snok/[email protected]
- name: Install project dependencies
run: poetry install --no-interaction --with dev
- name: Install poetry
run: |
python -m pip install poetry==1.4.2
- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true
- name: Upload logs on failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: logs
path: "*.log"
- name: Cache the virtualenv
uses: actions/cache@v3
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
python -m poetry install
- name: Run tests with coverage
run: |
# Run the unit tests
poetry run python3 -m coverage run -a -m unittest discover -v src
python -m poetry run coverage run -a -m unittest discover -v src
# Run the example plugin
poetry run python3 -m coverage run -a ./example_plugin.py -f example.yaml
python -m poetry run coverage run -a ./example_plugin.py -f example.yaml
# Test the example plugin
poetry run python3 -m coverage run -a ./test_example_plugin.py
python -m poetry run coverage run -a ./test_example_plugin.py
# Generate the coverage HTML report
poetry run python3 -m coverage html
python -m poetry run coverage html
- name: Publish coverage report to job summary
# publishing only once
if: ${{ matrix.python-version == '3.9'}}
Expand Down
Loading