2021-03-29 21:14:30 +05:30
|
|
|
name: ci
|
|
|
|
on:
|
|
|
|
push:
|
2023-01-07 01:31:49 +05:30
|
|
|
branches: [main]
|
2021-03-29 21:14:30 +05:30
|
|
|
pull_request:
|
2021-10-29 20:31:25 +02:00
|
|
|
workflow_dispatch:
|
2022-04-25 14:45:46 +05:30
|
|
|
env:
|
|
|
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
CARGO_INCREMENTAL: 0
|
2022-05-19 16:37:25 +05:30
|
|
|
CARGO_TERM_COLOR: always
|
2023-03-18 06:52:41 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2021-03-29 21:14:30 +05:30
|
|
|
jobs:
|
|
|
|
ci:
|
2021-10-29 20:31:25 +02:00
|
|
|
name: ${{ matrix.os }}
|
2021-03-29 21:14:30 +05:30
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-31 07:20:29 -04:00
|
|
|
os: [ubuntu-latest, windows-latest]
|
2021-03-29 21:14:30 +05:30
|
|
|
steps:
|
2023-09-05 02:28:49 +05:30
|
|
|
- uses: actions/checkout@v4
|
2022-02-25 09:49:45 +05:30
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-05-05 13:24:44 +05:30
|
|
|
- uses: actions-rs/toolchain@v1
|
2021-03-29 21:14:30 +05:30
|
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
|
|
with:
|
2023-05-06 03:16:13 +05:30
|
|
|
components: clippy
|
|
|
|
profile: minimal
|
2021-10-29 20:31:25 +02:00
|
|
|
toolchain: stable
|
2023-05-06 03:16:13 +05:30
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
|
|
with:
|
|
|
|
components: rustfmt
|
2021-10-29 20:31:25 +02:00
|
|
|
profile: minimal
|
2023-05-06 03:16:13 +05:30
|
|
|
toolchain: nightly
|
2024-03-13 23:00:04 +05:30
|
|
|
- uses: cachix/install-nix-action@v26
|
2021-03-29 21:14:30 +05:30
|
|
|
if: ${{ matrix.os != 'windows-latest' }}
|
|
|
|
with:
|
2022-04-25 14:45:46 +05:30
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2024-02-13 02:47:29 +05:30
|
|
|
- uses: cachix/cachix-action@v14
|
2022-04-25 14:45:46 +05:30
|
|
|
if: ${{ matrix.os != 'windows-latest' && env.CACHIX_AUTH_TOKEN != '' }}
|
|
|
|
with:
|
|
|
|
authToken: ${{ env.CACHIX_AUTH_TOKEN }}
|
|
|
|
name: zoxide
|
|
|
|
- name: Setup cache
|
2024-02-13 02:46:57 +05:30
|
|
|
uses: Swatinem/rust-cache@v2.7.3
|
2022-08-12 12:43:41 +05:30
|
|
|
with:
|
2023-05-05 13:24:44 +05:30
|
|
|
key: ${{ matrix.os }}
|
2023-05-06 03:16:13 +05:30
|
|
|
- name: Install just
|
|
|
|
uses: taiki-e/install-action@v2
|
|
|
|
with:
|
|
|
|
tool: just
|
2023-05-06 20:48:19 +05:30
|
|
|
- name: Run lints + tests
|
|
|
|
run: just lint test
|