2024-08-06 09:06:05 -05:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
2024-08-06 09:07:57 -05:00
|
|
|
formatting-nix:
|
|
|
|
runs-on: beefcake
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: alejandra -c .
|
|
|
|
run: 'nix develop -c alejandra -c .'
|
2024-08-06 09:59:05 -05:00
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
build:
|
|
|
|
runs-on: beefcake
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2024-08-06 09:59:05 -05:00
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
id: cache-build
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-build
|
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
- name: cargo build
|
|
|
|
run: 'nix develop -c cargo build'
|
2024-08-06 09:59:05 -05:00
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
test:
|
|
|
|
runs-on: beefcake
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2024-08-06 09:59:05 -05:00
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
id: cache-test
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-test
|
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
id: cache-test
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: prime-numbers
|
|
|
|
key: ${{ runner.os }}-build
|
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
- name: cargo test
|
|
|
|
run: 'nix develop -c cargo test'
|
2024-08-06 09:59:05 -05:00
|
|
|
|
2024-08-06 09:07:57 -05:00
|
|
|
formatting-rust:
|
2024-08-06 09:06:05 -05:00
|
|
|
runs-on: beefcake
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2024-08-06 09:59:05 -05:00
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
id: cache-formatting
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-formatting
|
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
- name: cargo fmt --check
|
|
|
|
run: 'nix develop -c cargo fmt --check'
|
2024-08-06 09:59:05 -05:00
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
lint:
|
|
|
|
runs-on: beefcake
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2024-08-06 09:59:05 -05:00
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
id: cache-lint
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-lint
|
|
|
|
|
2024-08-06 09:06:05 -05:00
|
|
|
- name: cargo clippy
|
|
|
|
run: 'nix develop -c cargo clippy'
|