Skip to content

Commit

Permalink
Merge pull request #42 from noctisynth/ci/rewrite-ci
Browse files Browse the repository at this point in the history
ci: add test, clippy and audit workflows
  • Loading branch information
fb0sh authored May 20, 2024
2 parents 8c40eaa + 66ef635 commit 85da250
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 168 deletions.
77 changes: 0 additions & 77 deletions .github/workflows/PR-Verification.yml

This file was deleted.

91 changes: 0 additions & 91 deletions .github/workflows/Push-Build.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Audit

Check failure on line 1 in .github/workflows/audit.yml

View workflow job for this annotation

GitHub Actions / Build failed

.github/workflows/audit.yml#L1

This run timed out after more than 35 days.

on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths:
- ".github/workflows/audit.yml"
- "**/Cargo.lock"
- "**/Cargo.toml"
pull_request:
branches:
- main
paths:
- ".github/workflows/audit.yml"
- "**/Cargo.lock"
- "**/Cargo.toml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
audit:
strategy:
fail-fast: false
matrix:
workspace: [server, src-tauri]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions-rust-lang/audit@v1
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
workingDirectory: ${{ matrix.workspace }}
52 changes: 52 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Check

on:
push:
branches:
- main
paths:
- ".github/workflows/check.yml"
- "**/*.rs"
- "**/Cargo.toml"
pull_request:
branches:
- main
paths:
- ".github/workflows/check.yml"
- "**/*.rs"
- "**/Cargo.toml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
fmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check

clippy:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cd server && cargo clippy --all-targets --all-features
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Server

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cd server && cargo test --all-targets --all-features

0 comments on commit 85da250

Please sign in to comment.