Skip to content

Commit

Permalink
ci: add triggers to make sure, workflows really just run when they sh…
Browse files Browse the repository at this point in the history
…ould

Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Mar 10, 2024
1 parent 9504113 commit 91a9c8f
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Security audit

on:
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.yml'
schedule:
# Runs at 00:00 UTC everyday
- cron: "0 0 * * *"
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.yml'
merge_group:
types: [checks_requested]

Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ concurrency:

on:
pull_request:
paths-ignore:
- "**/*.md"
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.rs'
- '**.snap'
- '**.yml'
- '**.toml'
push:
branches:
- main
paths-ignore:
- "**/*.md"
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.rs'
- '**.snap'
- '**.yml'
- '**.toml'
schedule:
- cron: "0 0 * * 0"
merge_group:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Test Coverage

on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
push:
paths:
- '**.rs'
- '**.snap'
- '**.yml'
jobs:
test:
name: Generate Coverage Report
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/cross-ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
name: Cross CI

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
paths-ignore:
- "**/*.md"
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.rs'
- '**.snap'
- '**.yml'
- '**.toml'
push:
branches:
- main
paths-ignore:
- "**/*.md"
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.rs'
- '**.snap'
- '**.yml'
- '**.toml'
merge_group:
types: [checks_requested]

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
cross-check:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ name: Lint Markdown / Toml

on:
pull_request:
paths:
- '**.json'
- '**.toml'
- '**.md'
push:
branches: [main]
paths:
- '**.json'
- '**.toml'
- '**.md'
merge_group:
types: [checks_requested]

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: Check MSRV

on:
pull_request:
paths-ignore:
- "**/*.md"
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.yml'
push:
branches:
- main
paths-ignore:
- "**/*.md"
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- '**.yml'
schedule:
- cron: "0 0 * * 0"
merge_group:
Expand Down

0 comments on commit 91a9c8f

Please sign in to comment.