Update bugs.md (#383) #734
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Regression Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
unittest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install Packages | |
run: pip install codespell flake8 | |
- name: Check Spelling | |
run: codespell --skip="./data"|| true | |
- name: Check Syntax Error | |
run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20.5' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
make | |
- name: Run unittest | |
run: > | |
COVERAGE_FILE=.coverage.${{ github.sha }}.unittest | |
pytest acto | |
--junitxml=pytest.xml | |
--cov-report= | |
--cov=acto | |
- name: Upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: .coverage.${{ github.sha }}.unittest | |
path: .coverage.${{ github.sha }}.unittest | |
retention-days: 1 | |
integration-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install Packages | |
run: pip install codespell flake8 | |
- name: Check Spelling | |
run: codespell --skip="./data"|| true | |
- name: Check Syntax Error | |
run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20.5' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
make | |
- name: Run integration test | |
run: > | |
COVERAGE_FILE=.coverage.${{ github.sha }}.integration-test | |
pytest test/integration_tests | |
--junitxml=pytest.xml | |
--cov-report= | |
--cov=acto | |
- name: Upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: .coverage.${{ github.sha }}.integration-test | |
path: .coverage.${{ github.sha }}.integration-test | |
retention-days: 1 | |
coverage-report: | |
runs-on: ubuntu-latest | |
needs: [unittest, integration-test] | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download unittest coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: .coverage.${{ github.sha }}.unittest | |
- name: Download integration test coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: .coverage.${{ github.sha }}.integration-test | |
- name: Merge coverage files | |
run: | | |
pip install coverage | |
coverage combine | |
- name: list files | |
run: ls -al | |
- name: Coverage comment | |
uses: py-cov-action/python-coverage-comment-action@v3 | |
with: | |
GITHUB_TOKEN: ${{ github.token }} | |
ANNOTATE_MISSING_LINES: true |