Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
# under the License.

name: Python test
on: [push, pull_request]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
Expand All @@ -30,19 +34,27 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
rustup component add rustfmt

- name: Cache Cargo
uses: actions/cache@v2
with:
path: /home/runner/.cargo
key: cargo-maturin-cache-${{ hashFiles('Cargo.lock') }}

- uses: actions/setup-python@v2
- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
override: true

- name: Cargo Clippy
run: cargo clippy

- name: Cargo Check
run: cargo check --all --frozen --locked

- name: Setup Python Toolchain
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand Down