Skip to content

Commit

Permalink
Split workflows into check and tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrupf committed Dec 16, 2024
1 parent 26205c5 commit df3dc77
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 59 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and run checks

on:
push:
branches: [ main ]
paths:
- '**.rs'
- '**/Cargo.*'
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: "" # overrides the -Dwarnings default

- name: Build
run: cargo build --verbose

- name: Check jaq-core without default features
working-directory: jaq-core
run: cargo check --no-default-features

- name: Check jaq-std without default features
working-directory: jaq-std
run: cargo check --no-default-features

- name: Check jaq-json without default features
working-directory: jaq-json
run: cargo check --no-default-features

- name: Clippy
run: cargo clippy -- -Dwarnings
59 changes: 0 additions & 59 deletions .github/workflows/rust.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and run tests

on:
push:
branches: [ main ]
paths:
- '**.rs'
- '**/Cargo.*'
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: build ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { target: i686-unknown-linux-gnu }
- { target: x86_64-unknown-linux-gnu }
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}

- name: Run tests
run: cargo test --verbose --target=${{ matrix.target }}

0 comments on commit df3dc77

Please sign in to comment.