chore(ci): upgrade to v5-beta #913
Workflow file for this run
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: Github Actions Python Standard | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-and-upstream: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.9"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
token: ${{ secrets.STANDARDS_TOKEN }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install pytest-cov | |
pip install requests | |
- name: Run Script | |
run: | | |
pytest --cov=./ --cov-report=xml | |
- name: Upload to Codecov | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
- name: Check coverage values | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
CORRECT_COVERAGE: ${{ vars.CORRECT_COVERAGE }} | |
run: | | |
cd src | |
python request.py | |
cd .. | |
- name: Upstream to Standards | |
env: | |
GH_TOKEN: ${{ secrets.STANDARDS_TOKEN }} | |
COVERAGE_SOURCE_FILE: ${{ secrets.COVERAGE_SOURCE_FILE }} | |
if: ${{ github.event_name == 'push'}} | |
run: | | |
wget --header "Authorization: token ${GH_TOKEN}" \ | |
--header "Accept: application/vnd.github.v3.raw" \ | |
https://api.github.com/repos/codecov/standards/contents/upstream.sh | |
bash upstream.sh |