Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Restructure project #1018

Merged
merged 18 commits into from
Jan 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
53 changes: 0 additions & 53 deletions .github/workflows/backend.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: checks

on:
# Triggers the workflow on push or pull request events but only for the main and develop branches
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/crates.yml'
- 'crates/**'

jobs:
crates:
runs-on: ubuntu-20.04
container: a6543/cabr2_ci:latest
strategy:
fail-fast: true
steps:
- name: Checkout Project
uses: actions/checkout@v2

- name: Set Rust Toolchain
run: rustup default stable

- name: Check formatting crates
run: cd crates && cargo fmt -- --check

- name: Lint crates
run: cd crates && cargo clippy --workspace --all-features -- --deny clippy::all

- name: Build crates
run: cd crates && cargo build --workspace

# TODO(692) reactivate when tests are written
# - name: Test crates
# run: cd crates && cargo test --workspace
41 changes: 17 additions & 24 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: checks

on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [master, develop]
branches: [main, develop]
pull_request:
branches: [master, develop]
branches: [main, develop]
paths:
- 'src/**'
- '*.json'
- '*.js'
- '.prettierignore'
- 'yarn.lock'
- '.github/workflows/frontend.yml'
- 'src-wasm/**'
- 'frontend/src/**'
- 'frontend/*.json'
- 'frontend/*.js'
- 'frontend/.prettierignore'
- 'frontend/yarn.lock'
- 'frontend/src-wasm/**'

jobs:
frontend:
Expand All @@ -30,27 +30,20 @@ jobs:
run: rustup default stable

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: cd frontend && yarn install --frozen-lockfile

- name: Check Formatting
run: yarn prettier -c src
run: cd frontend && yarn prettier -c src

- name: Eslint
run: yarn lint
run: cd frontend && yarn lint

- name: codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: ./.git,./.gitignore,node_modules,dist,yarn.lock,./src/assets,./translations,*.html,./src-tauri
ignore_words_list: crate,ser
- name: Build Tauri Frontend
run: cd frontend && yarn ng build --configuration production

- name: Build WASM binary
run: yarn wasm_lib:release

- name: Build Tauri Frontend
run: yarn ng build --configuration production
# debug compiles faster and everything gets checked in the dedicated wasm ci pipeline
run: cd frontend && yarn wasm_lib:debug

- name: Build Web Frontend
run: yarn ng build --configuration webProd
run: cd frontend && yarn ng build --configuration webProd
22 changes: 22 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: checks

on:
# Triggers the workflow on push or pull request events but only for the main and develop branches
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
codespell:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
steps:
- name: codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: ./.git,./.gitignore,node_modules,dist,yarn.lock,./src/assets,./translations
ignore_words_list: crate,ser
40 changes: 40 additions & 0 deletions .github/workflows/tauri-app-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: checks

on:
# Triggers the workflow on push or pull request events but only for the main and develop branches
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/frontend-rust.yml'
- 'frontend/src-tauri/**'

jobs:
frontend-rust:
runs-on: ubuntu-20.04
container: a6543/cabr2_ci:latest
strategy:
fail-fast: true
steps:
- name: Checkout Project
uses: actions/checkout@v2

- name: Set Rust Toolchain
run: rustup default stable

- name: Fix Build
run: mkdir -p frontend/dist/CaBr2 && echo "Hello" > frontend/dist/CaBr2/index.html

- name: Check formatting Tauri app
run: cd frontend/src-tauri && cargo fmt -- --check

- name: Lint Tauri app
run: cd frontend/src-tauri && cargo clippy -- -D warnings

- name: Build Tauri app
run: cd frontend/src-tauri && cargo build

# TODO(692) reactivate when tests are written
# - name: Test Tauri app
# run: cd frontend/src-tauri && cargo test
40 changes: 40 additions & 0 deletions .github/workflows/wasm-lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: checks

on:
# Triggers the workflow on push or pull request events but only for the main and develop branches
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/wasm-lib.yml'
- 'frontend/src-wasm/**'

jobs:
wasm-lib:
runs-on: ubuntu-20.04
container: a6543/cabr2_ci:latest
strategy:
fail-fast: true
steps:
- name: Checkout Project
uses: actions/checkout@v2

- name: Set Rust Toolchain
run: rustup default stable

- name: Check formatting WASM library
run: cd frontend/src-wasm && cargo fmt -- --check

- name: Lint WASM library
run: cd frontend/src-wasm && cargo clippy -- -D warnings

- name: Build WASM library debug
run: cd frontend/src-wasm && wasm-pack build --out-dir ../cabr2_wasm --dev -- --features debug_build

- name: Build WASM library release
run: cd frontend/src-wasm && wasm-pack build --out-dir ../cabr2_wasm --release

# TODO(692) reactivate when tests are written
# - name: Test WASM library
# run: cd frontend/src-wasm && cargo test
37 changes: 37 additions & 0 deletions .github/workflows/webserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: checks

on:
# Triggers the workflow on push or pull request events but only for the main and develop branches
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/webserver.yml'
- 'webserver/**'

jobs:
webserver:
runs-on: ubuntu-20.04
container: a6543/cabr2_ci:latest
strategy:
fail-fast: true
steps:
- name: Checkout Project
uses: actions/checkout@v2

- name: Set Rust Toolchain
run: rustup default stable

- name: Check formatting webserver
run: cd webserver && cargo fmt -- --check

- name: Lint webserver
run: cd webserver && cargo clippy -- -D warnings

- name: Build webserver
run: cd webserver && cargo build

# TODO(692) reactivate when tests are written
# - name: Test Webserver
# run: cd webserver && cargo test
Loading