Updated the CI to include version checking and a placeholder for depl… #48
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: Main | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
main: | |
strategy: | |
matrix: | |
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-12', 'macos-13', 'windows-2019', 'windows-2022'] | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Python Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{matrix.os}}-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | |
- name: Install Dependencies | |
shell: bash | |
run: pip3 install -U -r requirements.txt | |
- name: Check Python Version Compatibility | |
shell: bash | |
run: vermin --no-tips --no-parse-comments --target=3.7- --violations pacai | |
- name: Run Tests | |
shell: bash | |
run: ./run_tests.py | |
deploy-docs: | |
needs: [main] | |
if: ${{ github.event_name == 'push' && github.repository_owner == 'linqs' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} | |
# We will only run on one config, but using the matrix allows us to use the exact same steps. | |
strategy: | |
matrix: | |
os: ['ubuntu-22.04'] | |
python-version: ['3.10'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Python Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{matrix.os}}-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | |
- name: Install Dependencies | |
shell: bash | |
run: pip3 install -U -r requirements.txt |