[pre-commit.ci] pre-commit autoupdate #264
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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ main, staging ] | |
schedule: | |
# Weekly on Sunday | |
- cron: "0 1 * * 0" | |
jobs: | |
checks: | |
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: [ubuntu-latest, macos-latest, windows-latest] | |
# include: | |
# - python-version: pypy-3.8 | |
# runs-on: ubuntu-latest | |
steps: | |
- name: Fix install of gfortran (on macOS) | |
if: runner.os == 'macOS' | |
run: brew reinstall gfortran | |
shell: bash | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package (On Windows; Exclude DSECS (apexpy)) | |
if: runner.os == 'Windows' | |
run: | | |
python -m pip install .[test] | |
- name: Install package (On Linux / macOS) | |
if: runner.os != 'Windows' | |
run: | | |
export SETUPTOOLS_USE_DISTUTILS=stdlib # temporary fix for apexpy | |
python -m pip install .[test,dsecs] | |
- name: Configure token access | |
run: | | |
viresclient set_token "https://vires.services/ows" ${{ secrets.VIRES_TOKEN }} | |
viresclient set_default_server https://vires.services/ows | |
- name: Test package (On Windows; Exclude DSECS) | |
if: runner.os == 'Windows' | |
run: python -m pytest -ra -m "not dsecs" | |
- name: Test package (On Linux / macOS) | |
if: runner.os != 'Windows' | |
run: python -m pytest -ra | |
# dist: | |
# name: Distribution build | |
# runs-on: ubuntu-latest | |
# needs: [pre-commit] | |
# steps: | |
# - uses: actions/checkout@v1 | |
# - name: Build sdist and wheel | |
# run: pipx run build | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# path: dist | |
# - name: Check products | |
# run: pipx run twine check dist/* | |
# - uses: pypa/[email protected] | |
# if: github.event_name == 'release' && github.event.action == 'published' | |
# with: | |
# user: __token__ | |
# # Remember to generate this and set it in "GitHub Secrets" | |
# password: ${{ secrets.pypi_password }} | |
# # Remove this line | |
# repository_url: https://test.pypi.org/legacy/ |