Python versions (#281) #60
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: calculate coverage | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# Calculates new coverage for the base branch | |
calc_coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # need this so tags are pulled and versions work | |
- name: Install obsplus | |
uses: ./.github/actions/install-obsplus | |
with: | |
python-version: "3.12" | |
- name: run test suite | |
shell: bash -l {0} | |
run: | | |
pytest -s --cov obsplus --cov-report=xml | |
# upload coverage | |
- name: upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: PR_tests | |
fail_ci_if_error: false | |
update_gh_pages: | |
# Build new documentation for latest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # need this so tags are pulled and versions work | |
- name: Install obsplus | |
uses: ./.github/actions/install-obsplus | |
with: | |
python-version: "3.12" | |
- name: git config | |
shell: bash -l {0} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GithubActions" | |
- name: build docs | |
shell: bash -l {0} | |
run: | | |
python scripts/stage_docs.py --remove-dirty | |
- name: push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ../obsplus_documentation |