Skip to content

Commit

Permalink
Changed workflow to test all packages individually. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
QtKaii authored Jan 22, 2024
2 parents 263be1b + 267ad1c commit aee0ed7
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/pr_check.yml

This file was deleted.

118 changes: 118 additions & 0 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: pr_check

on:
workflow_dispatch:
push:
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
clippy-api:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Clippy for API
run: cargo clippy --package api

clippy-webapp:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Clippy for Webapp
run: cargo clippy --package webapp

build-api:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Build API
run: cargo build --package api

build-webapp:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
target: wasm32-unknown-unknown
toolchain: stable

- name: Install trunk from crates.io
uses: baptiste0928/cargo-install@v2
with:
crate: trunk

- name: Install wasm-bindgen-cli from crates.io
uses: baptiste0928/cargo-install@v2
with:
crate: wasm-bindgen-cli

- name: Build Webapp
working-directory: ./webapp
run: trunk build

test-api:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Test API
run: cargo test --package api

test-webapp:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Install trunk from crates.io
uses: baptiste0928/cargo-install@v2
with:
crate: trunk

- name: Install wasm-bindgen-cli from crates.io
uses: baptiste0928/cargo-install@v2
with:
crate: wasm-bindgen-cli

- name: Test Webapp
working-directory: ./webapp
run: cargo test --package webapp

0 comments on commit aee0ed7

Please sign in to comment.