chore(ci): use standard token #904
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/checkout@v4 | |
with: | |
token: ${{ secrets.STANDARDS_TOKEN }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
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/codecov-action@v4-beta | |
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 |