Skip to content

Commit

Permalink
Split up ci into test and lint workflows (ordinals#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Oct 28, 2022
1 parent da1ef82 commit f5b0287
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 19 deletions.
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

0 comments on commit f5b0287

Please sign in to comment.