Skip to content

Commit

Permalink
Revamp CI (#49)
Browse files Browse the repository at this point in the history
* Revamp CI

* Use test
  • Loading branch information
AurevoirXavier authored Mar 28, 2023
1 parent e75a65c commit 4382cc2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ updates:
directory: "/"
schedule:
interval: "daily"
labels:
- "Bot"
- "Deps"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Bot"
- "GA"
44 changes: 39 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,49 @@ on:
branches:
- main

env:
CARGO_TERM_COLOR: always

GITHUB_CACHE_VERSION: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RUST_BACKTRACE: full

jobs:
cargo_checks:
name: Task cargo test
cargo-checks:
name: Task cargo ${{ matrix.action }}
runs-on: ubuntu-latest
strategy:
matrix:
action: [clippy, fmt, test]
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Cargo test
uses: actions-rs/cargo@v1
- name: Cache cargo
uses: actions/cache@v3
with:
command: test
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-
- name: Cargo ${{ matrix.action }}
if: matrix.action == 'clippy'
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --all-targets --locked
- name: Cargo ${{ matrix.action }}
if: matrix.action == 'fmt'
run: cargo ${{ matrix.action }} --all -- --check
- name: Cargo ${{ matrix.action }}
if: matrix.action == 'test'
run: cargo ${{ matrix.action }} run --release --workspace --all-features --all-targets --locked
- name: Fast fail
uses: vishnudxb/cancel-workflow@v1.2
if: failure()
with:
repo: hack-ink/array-bytes
workflow_id: ${{ github.run_id }}
access_token: ${{ github.token }}
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"

env:
CARGO_TERM_COLOR: always
Expand Down

0 comments on commit 4382cc2

Please sign in to comment.