Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split test and lint #728

Merged
merged 7 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
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
22 changes: 3 additions & 19 deletions .github/workflows/ci.yaml → .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Lint

on:
push:
Expand All @@ -13,15 +13,8 @@ defaults:
shell: bash

jobs:
ci:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest

runs-on: ${{matrix.os}}
lint:
runs-on: ubuntu-latest

env:
RUSTFLAGS: --deny warnings
Expand All @@ -41,22 +34,13 @@ jobs:
- name: Check Lockfile
run: cargo update --locked --package ord

- name: Test
if: ${{ matrix.os != 'windows-latest' }}
run: cargo test --all

- name: Build Tests
if: ${{ matrix.os == 'windows-latest' }}
run: cargo build --tests

- name: Clippy
run: cargo clippy --all --all-targets

- name: Format
run: cargo fmt --all -- --check

- name: Check for Forbidden Words
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install ripgrep
./bin/forbid
46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

defaults:
run:
shell: bash

jobs:
test:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest

runs-on: ${{matrix.os}}

env:
RUSTFLAGS: --deny warnings

steps:
- uses: actions/checkout@v2

- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- uses: Swatinem/rust-cache@v1

- name: Test
if: ${{ matrix.os != 'windows-latest' }}
run: cargo test --all

- name: Build Tests
if: ${{ matrix.os == 'windows-latest' }}
run: cargo build --tests