From ba9d0ba054fa6ddd959ae279a21f9cf11bce328c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sat, 8 Mar 2025 23:46:54 +0100 Subject: [PATCH] Use my own flavor of GitHub workflows --- .github/FUNDING.yml | 2 +- .github/workflows/ci.yml | 21 --------------------- .github/workflows/format.yml | 12 ++++++++++++ .github/workflows/lint.yml | 12 ++++++++++++ .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/format.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index d55a828..65be35e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: [grovesNL] +github: [grovesNL, hecrj] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 7e39b36..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..3aa7eaf --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,12 @@ +name: Format +on: [push, pull_request] +jobs: + all: + runs-on: ubuntu-latest + steps: + - uses: hecrj/setup-rust-action@v2 + with: + components: rustfmt + - uses: actions/checkout@master + - name: Check format + run: cargo fmt --all -- --check --verbose diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..1d85f99 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +name: Lint +on: [push, pull_request] +jobs: + all: + runs-on: macOS-latest + steps: + - uses: hecrj/setup-rust-action@v2 + with: + components: clippy + - uses: actions/checkout@master + - name: Check lints + run: cargo clippy --workspace --no-deps diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..423d595 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Test +on: [push, pull_request] +jobs: + all: + runs-on: ${{ matrix.os }} + env: + RUSTFLAGS: --deny warnings + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + rust: [stable, beta] + steps: + - uses: hecrj/setup-rust-action@v2 + with: + rust-version: ${{ matrix.rust }} + - uses: actions/checkout@master + - name: Install dependencies + if: matrix.os == 'ubuntu-latest' + run: | + export DEBIAN_FRONTED=noninteractive + sudo apt-get -qq update + sudo apt-get install -y libxkbcommon-dev + - name: Run tests + run: | + cargo test --verbose --workspace