CI #474
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: | |
push: | |
pull_request: | |
# Run CI once a week even without code changes to ensure tests pass with updated dependencies. | |
schedule: | |
- cron: '0 0 * * 5' | |
# Allow triggering a CI run from the web UI. | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- { icon: 🐧, name: ubuntu-20.04 } | |
- { icon: 🍎, name: macos-latest } | |
# CI is currently broken on Windows | |
# https://github.com/olofk/fusesoc/issues/528 | |
#- { icon: 🧊, name: windows-latest } | |
pyver: | |
- '3.6' | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11.0-alpha - 3.11.0' | |
runs-on: ${{ matrix.os.name }} | |
name: ${{ matrix.os.icon }} ${{ matrix.os.name }} | ${{ matrix.pyver }} | |
steps: | |
- name: 🧰 Repository Checkout | |
uses: actions/checkout@v3 | |
- name: 🐍 Set up Python ${{ matrix.pyver }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.pyver }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: 🛠️ Install Tox and any other packages | |
run: pip install tox tox-gh-actions | |
- name: 🚧 Build package and run tests with tox | |
# XXX: Remove `-e py3-ci` and rely on the settings in tox.ini as soon as | |
# https://github.com/ymyzk/tox-gh-actions/issues/44 is resolved. | |
run: tox -e py3-ci |