2022-01-03 13:43:52 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2024-05-05 08:38:50 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-06-21 00:00:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-01-03 13:43:52 +00:00
|
|
|
jobs:
|
|
|
|
Lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-06-21 00:00:11 +00:00
|
|
|
- name: Harden Runner
|
2024-08-12 23:20:10 +00:00
|
|
|
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde
|
2023-06-21 00:00:11 +00:00
|
|
|
with:
|
|
|
|
disable-sudo: true
|
|
|
|
egress-policy: block
|
|
|
|
allowed-endpoints: >
|
|
|
|
github.com:443
|
|
|
|
static.rust-lang.org:443
|
|
|
|
|
2024-06-17 22:56:59 +00:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
2024-05-05 08:38:50 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-06-21 00:00:11 +00:00
|
|
|
|
|
|
|
- name: Rust toolchain
|
2024-08-12 23:16:39 +00:00
|
|
|
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
|
2022-01-03 13:43:52 +00:00
|
|
|
with:
|
2024-05-05 08:38:50 +00:00
|
|
|
toolchain: "1.73.0"
|
2022-01-03 13:43:52 +00:00
|
|
|
components: rustfmt
|
2023-06-21 00:00:11 +00:00
|
|
|
|
2022-01-03 13:43:52 +00:00
|
|
|
- name: Check Formatting
|
2023-02-14 13:20:59 +00:00
|
|
|
run: cargo fmt --check
|
2022-01-03 13:43:52 +00:00
|
|
|
|
|
|
|
Test:
|
2024-05-07 14:36:46 +00:00
|
|
|
continue-on-error: ${{ matrix.python-version == '3.13' }}
|
|
|
|
env:
|
|
|
|
UNSAFE_PYO3_SKIP_VERSION_CHECK: ${{ matrix.unsafe-pyo3-skip-version-check }}
|
2022-01-03 13:43:52 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2024-04-24 12:01:32 +00:00
|
|
|
python-version: ["3.12"]
|
|
|
|
allow-prereleases: [false]
|
2024-05-07 14:36:46 +00:00
|
|
|
unsafe-pyo3-skip-version-check: [0]
|
2022-01-03 13:43:52 +00:00
|
|
|
include:
|
2023-11-01 05:58:18 +00:00
|
|
|
- os: ubuntu-latest
|
2024-04-24 12:01:32 +00:00
|
|
|
python-version: "3.13"
|
|
|
|
allow-prereleases: true
|
2024-05-07 14:36:46 +00:00
|
|
|
unsafe-pyo3-skip-version-check: 1
|
2023-01-13 16:29:38 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
python-version: "3.11"
|
2024-04-24 12:01:32 +00:00
|
|
|
allow-prereleases: false
|
2022-01-03 13:43:52 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
python-version: "3.10"
|
2024-04-24 12:01:32 +00:00
|
|
|
allow-prereleases: false
|
2024-05-05 08:38:50 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
python-version: 3.9
|
|
|
|
allow-prereleases: false
|
2022-01-03 13:43:52 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
python-version: 3.8
|
2024-04-24 12:01:32 +00:00
|
|
|
allow-prereleases: false
|
2022-01-03 13:43:52 +00:00
|
|
|
runs-on: "${{ matrix.os }}"
|
|
|
|
steps:
|
2023-06-21 00:00:11 +00:00
|
|
|
- name: Harden Runner
|
2024-08-12 23:20:10 +00:00
|
|
|
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde
|
2023-06-21 00:00:11 +00:00
|
|
|
with:
|
|
|
|
disable-sudo: true
|
|
|
|
egress-policy: block
|
|
|
|
allowed-endpoints: >
|
|
|
|
api.github.com:443
|
|
|
|
crates.io:443
|
|
|
|
files.pythonhosted.org:443
|
|
|
|
github.com:443
|
|
|
|
pypi.org:443
|
|
|
|
static.crates.io:443
|
|
|
|
index.crates.io:443
|
|
|
|
static.rust-lang.org:443
|
2023-11-01 05:58:18 +00:00
|
|
|
objects.githubusercontent.com:443
|
2023-06-21 00:00:11 +00:00
|
|
|
|
2024-06-17 22:56:59 +00:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
2024-05-05 08:38:50 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2024-07-29 23:11:07 +00:00
|
|
|
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # 5.1.1
|
2022-01-03 13:43:52 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-04-24 12:01:32 +00:00
|
|
|
allow-prereleases: ${{ matrix.allow-prereleases }}
|
2023-06-21 00:00:11 +00:00
|
|
|
|
2024-08-12 23:16:39 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
|
2022-01-03 13:43:52 +00:00
|
|
|
with:
|
2024-05-05 08:38:50 +00:00
|
|
|
toolchain: "1.73.0"
|
2023-06-21 00:00:11 +00:00
|
|
|
|
2024-01-15 22:20:16 +00:00
|
|
|
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # 2.7.3
|
2022-01-17 12:57:34 +00:00
|
|
|
- run: python3 -m pip install nox
|
|
|
|
- run: nox -s test-${{ matrix.python-version }}
|