New Build: 09/13/23 00:12:53 #897
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test-and-upstream: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- 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@v3 | |
- 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.GH_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 |