diff options
| author | liv <shadows_withal@fastmail.com> | 2023-09-04 14:57:16 +0200 |
|---|---|---|
| committer | liv <shadows_withal@fastmail.com> | 2023-09-04 14:57:16 +0200 |
| commit | f31a18429b051c265a3ffcdc1888dd4053e6a572 (patch) | |
| tree | 9134b43dc80077e8793ded0d2b3a92ad0f36b516 | |
| parent | 3ad30308ec39dc6f108493fdca7dd133a8b28b8e (diff) | |
chore: consolidate CI workflows
| -rw-r--r-- | .github/workflows/lint.yml | 18 | ||||
| -rw-r--r-- | .github/workflows/rust.yml | 31 |
2 files changed, 23 insertions, 26 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 67339d1..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Lint - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: DavidAnson/markdownlint-cli2-action@v9 - with: - globs: "exercises/**/*.md" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1b244b1..226d413 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,13 +10,28 @@ env: CARGO_TERM_COLOR: always jobs: - build: + fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Fetch & maybe update Cargo.lock - run: cargo fetch --locked - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - uses: DavidAnson/markdownlint-cli2-action@v9 + with: + globs: "exercises/**/*.md" + - name: Run cargo fmt + run: | + cargo fmt --all -- --check + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - uses: swatinem/rust-cache@v2 + - name: Run cargo test + run: | + cargo test |
