Skip to content

Commit

Permalink
Add CI workflow + funding file.
Browse files Browse the repository at this point in the history
  • Loading branch information
tec27 committed Jan 16, 2024
1 parent 40a58e0 commit b0f91b2
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: ShieldBattery
ko_fi: tec27
patreon: tec27
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on: [push, pull_request]

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

jobs:
clippy:
runs-on: windows-latest
defaults:
run:
working-directory: ./native
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- uses: Swatinem/rust-cache@v2
with:
workspaces: ./native

- name: clippy
run: cargo clippy --all-targets --workspace -- -D warnings

fmt:
runs-on: windows-latest
defaults:
run:
working-directory: ./native
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: rustfmt
run: cargo fmt --all -- --check

test:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
with:
workspaces: ./native

- name: Using pnpm v8.x
uses: pnpm/action-setup@v2
with:
version: 8

- name: Using Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'pnpm'

- name: Install JS dependencies
run: pnpm install --frozen-lockfile

- name: Tests
run: pnpm test

0 comments on commit b0f91b2

Please sign in to comment.