Skip to content

Commit

Permalink
Add CI checks for every commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hiarthurbr committed Jul 31, 2023
1 parent 06435d5 commit 744fcdc
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/check-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Rust development check

on:
- push

env:
CARGO_TERM_COLOR: always

jobs:
stable:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup compiler
run: rustup update stable && rustup default stable
- name: Check
run: cargo check --verbose
- name: Run tests
run: cargo test --verbose
- name: Run formatter
run: cargo fmt -- --check --verbose
beta:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup compiler
run: rustup update beta && rustup default beta
- name: Setup formatter
run: rustup component add rustfmt --toolchain beta
- name: Check
run: cargo check --verbose
- name: Run tests
run: cargo test --verbose
- name: Run formatter
run: cargo fmt -- --check --verbose
nightly:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup compiler
run: rustup update nightly && rustup default nightly
- name: Setup formatter
run: rustup component add rustfmt --toolchain nightly
- name: Check
run: cargo check --verbose
- name: Run tests
run: cargo test --verbose
- name: Run formatter
run: cargo fmt -- --check --verbose
24 changes: 24 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Rust release check

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup compiler
run: rustup update stable && rustup default stable
- name: Check
run: cargo check --release --verbose
- name: Run tests
run: cargo test --verbose
69 changes: 69 additions & 0 deletions .github/workflows/lint-gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Next.js check

on:
- push
- pull_request

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Enter GUI directory
run: cd src/gui
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint with Next.js
run: pnpm lint
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Enter GUI directory
run: cd src/gui
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build with Next.js
run: pnpm build

0 comments on commit 744fcdc

Please sign in to comment.