tantivy-py/.github/workflows/ci.yml

105 lines
2.9 KiB
YAML
Raw Permalink Normal View History

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
permissions:
contents: read
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
static.rust-lang.org:443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2024-05-05 08:38:50 +00:00
with:
fetch-depth: 0
- name: Rust toolchain
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
with:
2024-09-22 14:40:21 +00:00
toolchain: "stable"
components: rustfmt
- name: Check Formatting
run: cargo fmt --check
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 }}
strategy:
matrix:
2024-10-16 16:36:12 +00:00
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12"]
allow-prereleases: [false]
2024-05-07 14:36:46 +00:00
unsafe-pyo3-skip-version-check: [0]
include:
- os: ubuntu-latest
python-version: "3.13"
allow-prereleases: true
2024-05-07 14:36:46 +00:00
unsafe-pyo3-skip-version-check: 1
- os: ubuntu-latest
python-version: "3.11"
allow-prereleases: false
- os: ubuntu-latest
python-version: "3.10"
allow-prereleases: false
2024-05-05 08:38:50 +00:00
- os: ubuntu-latest
python-version: 3.9
allow-prereleases: false
- os: ubuntu-latest
python-version: 3.8
allow-prereleases: false
runs-on: "${{ matrix.os }}"
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
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
objects.githubusercontent.com:443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2024-05-05 08:38:50 +00:00
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: ${{ matrix.allow-prereleases }}
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
with:
2024-09-22 14:40:21 +00:00
toolchain: "stable"
2024-10-16 16:36:12 +00:00
#- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # 2.7.3
- run: python -m pip install nox
2022-01-17 12:57:34 +00:00
- run: nox -s test-${{ matrix.python-version }}