Tweak Github Actions (#366) #1683
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: ./.github/actions/setup-rust | |
- name: Run Format Check | |
run: cargo +nightly fmt -- --check | |
- name: Run Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
- name: Run Cargo Test | |
env: | |
CARGO_BUILD_JOBS: 1 | |
run: cargo test | |
- name: Build Python Package | |
uses: PyO3/maturin-action@v1 | |
- name: Upload Python Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package | |
path: target/wheels | |
retention-days: 1 | |
spark-tests: | |
name: Spark Tests | |
uses: ./.github/workflows/spark-tests.yml | |
needs: | |
- build | |
python-build: | |
name: Python Build | |
uses: ./.github/workflows/python-build.yml | |
needs: | |
- build | |
docs-build: | |
name: Docs Build | |
uses: ./.github/workflows/docs-build.yml | |
strategy: | |
matrix: | |
stage: ${{ fromJSON(github.event_name == 'push' && '["dev", "prod"]' || '["test"]') }} | |
needs: | |
- build | |
with: | |
stage: ${{ matrix.stage }} | |
version: main | |
docs-deploy: | |
name: Docs Deploy | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: ./.github/workflows/docs-deploy.yml | |
strategy: | |
max-parallel: 1 | |
matrix: | |
stage: [dev, prod] | |
permissions: | |
id-token: write | |
needs: | |
- docs-build | |
with: | |
stage: ${{ matrix.stage }} | |
version: main |