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

Commit

Permalink
chore: update github actions workflows and remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed May 23, 2023
1 parent 7ec8b14 commit b032bae
Show file tree
Hide file tree
Showing 150 changed files with 74 additions and 10,286 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'Chromatic'
name: "Chromatic"

on:
push:
paths:
- 'webui/**'
- '.github/workflows/chromatic.yml'
- "webui/**"
- ".github/workflows/chromatic.yml"
workflow_dispatch:

# List of jobs
Expand All @@ -19,8 +19,7 @@ jobs:
with:
bun-version: latest
- name: Install dependencies
run: cd ./webui && bun install
run: cd ./crates/webui/webui && bun install
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
run: cd ./webui && bun run build-storybook && bun run chromatic -- --project-token=${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes

run: cd ./crates/webui/webui && bun run build-storybook && bun run chromatic -- --project-token=${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes
8 changes: 4 additions & 4 deletions .github/workflows/release-for-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
with:
node-version: 16
- name: Install webui dependencies
run: cd ./webui && bun install
run: cd ./crates/webui/webui && bun install
- name: Build webui
run: cd ./webui && bun run build
run: cd ./crates/webui/webui && bun run build
- name: Running cargo build
uses: actions-rs/cargo@v1
with:
command: build
toolchain: stable
args: --release --target ${{ matrix.target }}
args: -p superviseur --release --target ${{ matrix.target }}
- name: Install aarch64-apple-darwin toolchain
if: matrix.target == 'aarch64-apple-darwin'
run: rustup target add aarch64-apple-darwin
Expand All @@ -62,4 +62,4 @@ jobs:
target/${{ matrix.target }}/release/superviseur_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz
target/${{ matrix.target }}/release/superviseur_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ jobs:
with:
node-version: 16
- name: Install webui dependencies
run: cd ./webui && bun install
run: cd ./crates/webui/webui && bun install
- name: Build webui
run: cd ./webui && bun run build
run: cd ./crates/webui/webui && bun run build
- name: Running cargo build
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions-rs/cargo@v1
with:
command: build
toolchain: stable
args: --release --target x86_64-unknown-linux-gnu
args: -p superviseur --release --target x86_64-unknown-linux-gnu
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Packaging final binary
Expand All @@ -61,4 +61,4 @@ jobs:
target/x86_64-unknown-linux-gnu/release/superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz
target/x86_64-unknown-linux-gnu/release/superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: tests

on:
push:
branches: ["master"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["master"]
workflow_dispatch:
branches: ["*"]

jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
components: llvm-tools-preview
override: true

- name: Install cargo-llvm-cov
run: |
if type cargo-llvm-cov >/dev/null 2>&1; then echo "cargo-llvm-cov is already installed"; else cargo install cargo-llvm-cov ; fi
- name: Installing needed dependencies
run: sudo apt-get install -y protobuf-compiler

- name: Run cargo-llvm-cov
run: |
cargo llvm-cov --all-features --lib --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .vscode/superviseur.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
{
"path": ".."
},
{
"path": "../webui"
},
{
"path": "../examples/deno-fresh"
},
Expand All @@ -26,6 +23,9 @@
},
{
"path": "../sdk/rust"
},
{
"path": "../crates/webui/webui"
}
],
"settings": {
Expand Down
23 changes: 0 additions & 23 deletions webui/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion webui/.nvmrc

This file was deleted.

16 changes: 0 additions & 16 deletions webui/.storybook/main.js

This file was deleted.

32 changes: 0 additions & 32 deletions webui/.storybook/preview.js

This file was deleted.

50 changes: 0 additions & 50 deletions webui/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions webui/build/asset-manifest.json

This file was deleted.

Binary file removed webui/build/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion webui/build/index.html

This file was deleted.

Binary file removed webui/build/logo192.png
Binary file not shown.
Binary file removed webui/build/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions webui/build/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions webui/build/robots.txt

This file was deleted.

Loading

0 comments on commit b032bae

Please sign in to comment.