mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-11 05:46:18 +00:00
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: "PyTest & Codecov | Testing and Code Coverage"
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
pull_request:
|
|
types: [opened, reopened, edited, synchronize]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
default_branch: dev
|
|
|
|
jobs:
|
|
pytest:
|
|
name: pytest
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
security-events: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11.6"
|
|
|
|
- name: Install project dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
if [ -f requirements.txt ];
|
|
then pip install -r requirements.txt;
|
|
fi
|
|
|
|
- name: Run pytest
|
|
uses: pavelzw/pytest-action@v2
|
|
with:
|
|
custom-arguments: "--cov --cov-report=xml"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|