diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7931cea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + CARGO_TERM_COLOR: always + +jobs: + self-care: + name: Flake self-check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check Nix flake inputs + uses: DeterminateSystems/flake-checker-action@v7 + with: + fail-mode: true + + pre-commit-checks: + name: "Pre-commit checks: cargo fmt, typos" + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v11 + - name: Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@v6 + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Pre-commit checks + run: nix develop -i -L --command just check diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml deleted file mode 100644 index 27656ff..0000000 --- a/.github/workflows/prettier.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: prettier - -on: [push, pull_request] - -jobs: - prettier: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - - - name: Install dependencies - run: npm install -g prettier - - - name: Run Prettier check - run: npx prettier --check .