build-linux-arm64: switch from QEMU-emulated linux-arm64 runner to cross-compile on linux-amd64 using aarch64-linux-gnu toolchain. Removes the uname -m arch guard that was causing the job to exit immediately (QEMU reports x86_64 as kernel arch), and fixes the artifact path to the explicit target directory. All build jobs: replace `cargo install tauri-cli --locked` with `npx tauri build`, using the pre-compiled @tauri-apps/cli binary from devDependencies. Eliminates the 20-30 min Tauri CLI recompilation on every run. wiki-sync: move from test.yml to auto-tag.yml. test.yml only fires on pull_request events so the `if: github.ref == 'refs/heads/master'` guard was never true and the wiki was never updated. auto-tag.yml triggers on push to master, so wiki sync now runs on every merge. Update releaseWorkflowCrossPlatformArtifacts.test.ts to match the new workflow.
142 lines
5.5 KiB
YAML
142 lines
5.5 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
rust-fmt-check:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: rust:1.88-slim
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
set -eux
|
|
apt-get update -qq && apt-get install -y -qq git
|
|
git init
|
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
|
git fetch --depth=1 origin "$REF_NAME"
|
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
|
else
|
|
git fetch --depth=1 origin master
|
|
echo "Fetched fallback ref: master"
|
|
fi
|
|
git checkout FETCH_HEAD
|
|
- run: rustup component add rustfmt
|
|
- run: cargo fmt --manifest-path src-tauri/Cargo.toml --check
|
|
|
|
rust-clippy:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: rust:1.88-slim
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
set -eux
|
|
apt-get update -qq && apt-get install -y -qq git
|
|
git init
|
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
|
git fetch --depth=1 origin "$REF_NAME"
|
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
|
else
|
|
git fetch --depth=1 origin master
|
|
echo "Fetched fallback ref: master"
|
|
fi
|
|
git checkout FETCH_HEAD
|
|
- run: apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl
|
|
- run: rustup component add clippy
|
|
- run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings
|
|
|
|
rust-tests:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: rust:1.88-slim
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
set -eux
|
|
apt-get update -qq && apt-get install -y -qq git
|
|
git init
|
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
|
git fetch --depth=1 origin "$REF_NAME"
|
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
|
else
|
|
git fetch --depth=1 origin master
|
|
echo "Fetched fallback ref: master"
|
|
fi
|
|
git checkout FETCH_HEAD
|
|
- run: apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl
|
|
- run: cargo test --manifest-path src-tauri/Cargo.toml
|
|
|
|
frontend-typecheck:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:22-alpine
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
set -eux
|
|
apk add --no-cache git
|
|
git init
|
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
|
git fetch --depth=1 origin "$REF_NAME"
|
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
|
else
|
|
git fetch --depth=1 origin master
|
|
echo "Fetched fallback ref: master"
|
|
fi
|
|
git checkout FETCH_HEAD
|
|
- run: npm ci --legacy-peer-deps
|
|
- run: npx tsc --noEmit
|
|
|
|
frontend-tests:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:22-alpine
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
set -eux
|
|
apk add --no-cache git
|
|
git init
|
|
git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git
|
|
if [ -n "${GITHUB_SHA:-}" ] && git fetch --depth=1 origin "$GITHUB_SHA"; then
|
|
echo "Fetched commit SHA: $GITHUB_SHA"
|
|
elif [ -n "${GITHUB_REF_NAME:-}" ] && git fetch --depth=1 origin "$GITHUB_REF_NAME"; then
|
|
echo "Fetched ref name: $GITHUB_REF_NAME"
|
|
elif [ -n "${GITHUB_REF:-}" ]; then
|
|
REF_NAME="${GITHUB_REF#refs/heads/}"
|
|
git fetch --depth=1 origin "$REF_NAME"
|
|
echo "Fetched ref from GITHUB_REF: $REF_NAME"
|
|
else
|
|
git fetch --depth=1 origin master
|
|
echo "Fetched fallback ref: master"
|
|
fi
|
|
git checkout FETCH_HEAD
|
|
- run: npm ci --legacy-peer-deps
|
|
- run: npm run test:run
|