mirror of
https://github.com/librekeys/picoforge.git
synced 2026-07-28 08:01:19 -07:00
feat: add basic rust ci workflow
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI Checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v22
|
||||
|
||||
- name: Setup Nix cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@v14
|
||||
|
||||
- name: Check formatting
|
||||
run: nix develop --command cargo fmt --all -- --check
|
||||
|
||||
- name: Run cargo check
|
||||
run: nix develop --command cargo check --all-targets
|
||||
|
||||
- name: Run clippy
|
||||
run: nix develop --command cargo clippy --all-targets -- -D warnings
|
||||
|
||||
- name: Build project
|
||||
run: nix develop --command cargo build --verbose
|
||||
|
||||
- name: Run tests
|
||||
run: nix develop --command cargo test --verbose
|
||||
@@ -4,9 +4,16 @@ on:
|
||||
branches:
|
||||
- release
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: ["CI"]
|
||||
branches:
|
||||
- release
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
|
||||
@@ -19,10 +19,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Push to Wiki
|
||||
uses: Andrew-Chen-Wang/github-wiki-action@v4
|
||||
uses: Andrew-Chen-Wang/github-wiki-action@v5
|
||||
with:
|
||||
path: docs
|
||||
token: ${{ secrets.WIKI_SYNC_PAT_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user