Skip to content

Commit

Permalink
Adds CI binary and workflow (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 authored Apr 5, 2024
1 parent aa55ed6 commit 5169f39
Show file tree
Hide file tree
Showing 22 changed files with 858 additions and 299 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI

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

env:
RUSTFLAGS: "-Dwarnings"

jobs:
nodejs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 21.7.1

- name: Install
run: npm install --omit=dev
working-directory: ./ui

- name: Lint
run: npm run lint
working-directory: ./ui

- name: Test
run: npm run test
working-directory: ./ui

- name: Build
run: npm run build
working-directory: ./ui

rust:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set Rust version
run: |
rustup update 1.77.1 &&\
rustup default 1.77.1 &&\
rustup component add clippy
- name: Lint
run: cargo clippy --all-targets --all-features

- name: Test
run: cargo test

ci:
needs:
- nodejs
- rust

runs-on: self-hosted

env:
BUILD_ID: ${{ github.job }}-${{ github.run_id }}

steps:
- uses: actions/checkout@v4

- name: Build CI
run: |
docker \
run \
--rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
-u 1000:1000 \
rust:1.77.1 \
sh -c 'cargo build --bin ci'
- name: Run CI
run: ./target/debug/ci --all
35 changes: 0 additions & 35 deletions .github/workflows/node.js.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/rust.yaml

This file was deleted.

Loading

0 comments on commit 5169f39

Please sign in to comment.