updates per-language steps and adds ci entrypoint #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.0 &&\ | ||
rustup default 1.77.0 &&\ | ||
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: ${{ env.GITHUB_JOB}}-${{ env.GITHUB_RUN_ID }} | ||
container: | ||
image: rust:1.77.0 | ||
volumes: | ||
- /var/run/docker.sock | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Docker CLI | ||
run: | | ||
apt-get update | ||
apt-get install ca-certificates curl | ||
install -m 0755 -d /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc | ||
chmod a+r /etc/apt/keyrings/docker.asc | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
apt-get update | ||
apt-get install -y docker-ce-cli | ||
- name: Run CI | ||
run: cargo run --bin ci -- --all |