ci: skip test workflow pushes on master
Avoid rerunning the full test workflow on direct master pushes while keeping pull request validation intact. Update the CI/CD wiki page to reflect the new trigger behavior. Made-with: Cursor
This commit is contained in:
parent
b426f56149
commit
8e7356e62d
@ -2,8 +2,8 @@ name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
branches-ignore:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@ -14,10 +14,22 @@ jobs:
|
||||
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
|
||||
git fetch --depth=1 origin $GITHUB_SHA
|
||||
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
|
||||
@ -29,10 +41,22 @@ jobs:
|
||||
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
|
||||
git fetch --depth=1 origin $GITHUB_SHA
|
||||
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
|
||||
@ -45,10 +69,22 @@ jobs:
|
||||
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
|
||||
git fetch --depth=1 origin $GITHUB_SHA
|
||||
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
|
||||
@ -60,10 +96,22 @@ jobs:
|
||||
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
|
||||
git fetch --depth=1 origin $GITHUB_SHA
|
||||
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
|
||||
@ -75,10 +123,22 @@ jobs:
|
||||
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
|
||||
git fetch --depth=1 origin $GITHUB_SHA
|
||||
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
|
||||
|
||||
@ -29,7 +29,7 @@ macOS runner runs jobs **directly on the host** (no Docker container) — macOS
|
||||
|
||||
## Test Pipeline (`.woodpecker/test.yml`)
|
||||
|
||||
**Triggers:** Every push and pull request to any branch.
|
||||
**Triggers:** Every push to non-`master` branches and all pull requests.
|
||||
|
||||
```
|
||||
Pipeline steps:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user