Skip to content

Adds initial API (#24) #67

Adds initial API (#24)

Adds initial API (#24) #67

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
RUSTFLAGS: "-Dwarnings"
BUILD_ID: ${{ github.job }}-${{ github.run_id }}
ESLINT_USE_FLAT_CONFIG: false
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.3
- 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.2 &&\
rustup default 1.77.2 &&\
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
steps:
- uses: actions/checkout@v4
- name: Build CI
run: |
docker \
build \
-t wiki-ci:build-$BUILD_ID \
-f images/build.Dockerfile \
.
docker \
run \
--rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
wiki-ci:build-$BUILD_ID \
sh -c 'cargo build --bin ci'
- name: Run CI
run: ./target/debug/ci --github-logger --all