Skip to content

Added a script to deploy to pypi. Changed the pypi project (not packa… #58

Added a script to deploy to pypi. Changed the pypi project (not packa…

Added a script to deploy to pypi. Changed the pypi project (not packa… #58

Workflow file for this run

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.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.8- --violations pacai
- name: Run Tests
shell: bash
run: ./run_tests.py
- name: Generate Documentation
if: runner.os == 'Linux'
shell: bash
run: ./gen_docs.sh
deploy-docs:
needs: [main]
if: ${{ github.event_name == 'push' && github.repository_owner == 'linqs' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# 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
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build Site
shell: bash
run: ./.ci/build_site.sh
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: '._site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4