Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierdag committed Dec 15, 2023
2 parents 0b46f81 + 44a2f8d commit 98d1ce6
Showing 1 changed file with 38 additions and 7 deletions.
45 changes: 38 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,45 @@
name: CI

on:
workflow_run:
workflows: ["test"]
branches: [release]
types:
- completed
release:
types: [created]

permissions:
contents: read

jobs:
test:
name: Test for ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
cache: "pip"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: llvm-tools-preview
- name: Setup virtual environment
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Run tests
run: |
source venv/bin/activate
cargo test
maturin develop --release
pytest tests
linux:
needs: [test]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -40,6 +68,7 @@ jobs:
path: dist

windows:
needs: [test]
runs-on: windows-latest
strategy:
matrix:
Expand All @@ -63,6 +92,7 @@ jobs:
path: dist

macos:
needs: [test]
runs-on: macos-latest
strategy:
matrix:
Expand All @@ -85,6 +115,7 @@ jobs:
path: dist

sdist:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -104,14 +135,14 @@ jobs:
runs-on: ubuntu-latest
needs: [linux, windows, macos, sdist]
if: "startsWith(github.ref, 'refs/tags/')"
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing *

0 comments on commit 98d1ce6

Please sign in to comment.