Skip to content

chore: Modify GitHub actions workflow and add dependencies #26

chore: Modify GitHub actions workflow and add dependencies

chore: Modify GitHub actions workflow and add dependencies #26

Workflow file for this run

name: CI and documentation
on:
push:
branches-ignore:
- main
workflow_dispatch:
jobs:
checks:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python versions
uses: actions/setup-python@v4
with:
python-version: |
3.10
3.11
3.12
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
cache: true
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pdm install --no-default -dG maintenance -dG checks
- name: Check code quality
run: pdm checks quality
- name: Check vulnerabilities in dependencies
env:
SAFETY_API_KEY: ${{ secrets.SAFETY_API_KEY }}
run: pdm checks dependencies
tests:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python versions
uses: actions/setup-python@v4
with:
python-version: |
3.10
3.11
3.12
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
cache: true
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pdm install -dG maintenance -dG tests
- name: Run the test suite
run: pdm tests
doc:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
cache: true
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pdm install -dG maintenance -dG docs
- name: Build documentation with Python ${{ matrix.python-version }}
run: pdm docs build