diff --git a/.github/workflows/post-pr-comment.yml b/.github/workflows/post-pr-comment.yml new file mode 100644 index 0000000..d3997a0 --- /dev/null +++ b/.github/workflows/post-pr-comment.yml @@ -0,0 +1,12 @@ +name: Post pull request comment + +on: + workflow_run: + workflows: [Test suite] + types: [completed] + +jobs: + post_pr_comment: + uses: BMCV/github-workflows/.github/workflows/coverage-post-pr-comment.yml@main + secrets: + github-auth: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 8ab00dd..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Tests - -on: - workflow_dispatch: - pull_request: - push: - branches: ['master'] - -permissions: - contents: read - issues: write - pull-requests: write - -jobs: - - run_tests: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - "3.9" - - "3.10" - - steps: - - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install coverage - - - name: Run tests - uses: kostrykin/report-test-coverage-action@v1.0.2 - with: - report: ${{ strategy.job-index == 0 }} - gist-id: bb85310a74d6b05330d230443007b878 - github-auth: ${{ secrets.GITHUB_TOKEN }} - gist-auth: ${{ secrets.GIST_SECRET }} - gist-filename: tournaments.json - working-directory: tournaments - run: | - coverage run --source='.' manage.py test - python -m coverage json --omit "*/tests.py,*/migrations/*.py,manage.py" diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml new file mode 100644 index 0000000..f6513af --- /dev/null +++ b/.github/workflows/testsuite.yml @@ -0,0 +1,36 @@ +name: Test suite + +on: + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - develop + - master + paths: + - .github/workflows/testsuite.yml + - giatools/*.py + - setup.py + - tests/*.py + - tests/data/** + - requirements.txt + - tests/requirements.txt + +jobs: + run_testsuite: + name: Tests + uses: BMCV/github-workflows/.github/workflows/coverage-run.yml@main + with: + main_branch: master + python_versions: '["3.9", "3.10"]' + main_python_version: "3.10" + pip-install: -r requirements.txt + gist-id: bb85310a74d6b05330d230443007b878 + gist-filename: tournaments.json + run: | + coverage run --source='.' manage.py test + python -m coverage json --omit "*/tests.py,*/migrations/*.py,manage.py" + secrets: + gist-auth: ${{ secrets.GIST_SECRET }}