ci: fixed licence for gitleaks; test script added #6
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: Test | |
on: | |
push: | |
branches: [develop, main] | |
pull_request: | |
branches: [develop, main] | |
types: | |
- opened | |
- synchronize | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true # This option ensures that Git LFS files are checked out | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install PDM | |
run: python -m pip install pdm | |
- name: Install dependencies with PDM | |
run: pdm install | |
- name: Run tests with coverage report | |
# run: pdm run pytest --cov=./ --cov-report=html -m "not manual" | |
run: ./scripts/test.sh "Coverage for ${{ github.sha }}" | |
- name: Store coverage files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-html | |
path: htmlcov | |
# https://github.com/marketplace/actions/alls-green#why | |
alls-green: # This job does nothing and is only used for the branch protection | |
if: always() | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |