Cleanup #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate PR | |
on: | |
workflow_call: | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
# 40 MiB stack | |
RUST_MIN_STACK: 40971520 | |
RUST_LOG: 'citadel=warn' | |
jobs: | |
fmt: | |
name: Cargo Fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Avarok-Cybersecurity/gh-actions-deps@master | |
- run: cargo fmt --check | |
clippy: | |
name: Cargo Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Avarok-Cybersecurity/gh-actions-deps@master | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: install dependencies (ubuntu only) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | |
- name: install frontend dependencies | |
run: yarn install # change this to npm or pnpm depending on which one you use | |
- run: cargo clippy --all -- -D warnings | |
test: | |
name: Cargo Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Avarok-Cybersecurity/gh-actions-deps@master | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: install dependencies (ubuntu only) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libglvnd-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev libsoup-3.0-0 libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev | |
- name: install frontend dependencies | |
run: yarn # change this to npm or pnpm depending on which one you use | |
- run: cargo test | |
tauri-build: | |
name: Tauri Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Avarok-Cybersecurity/gh-actions-deps@master | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: install dependencies (ubuntu only) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libglvnd-dev libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | |
- run: cargo install create-tauri-app | |
- run: cargo install tauri-cli --version 2.0.0-alpha.21 | |
- run: yarn install | |
- uses: tauri-apps/tauri-action@v0 | |
eslint: | |
name: eslint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install node v20 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: yarn install | |
run: yarn install | |
- name: eslint | |
uses: icrawl/action-eslint@v1 | |
with: | |
custom-glob: '**/*.{js,ts,tsx}' |