Skip to content

Commit

Permalink
Unify workflow triggers (#70)
Browse files Browse the repository at this point in the history
Unify and sort workflow triggers
  • Loading branch information
piotrzajac authored Oct 16, 2023
1 parent 816579f commit 19fb518
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 44 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
name: CI/CD

on:
pull_request:
paths:
- 'src/**'
- 'GitVersion.yml'
- '.github/workflows/cicd.yml'
- '.github/actions/materialize-signing-key/**'
types: [opened, synchronize, reopened]
push:
branches:
- 'master'
paths:
- 'src/**'
- 'GitVersion.yml'
- '.github/workflows/cicd.yml'
- '.github/actions/materialize-signing-key/**'
workflow_dispatch:
inputs:
buildAutoMoq:
description: "Build AutoMoq"
description: 'Build AutoMoq'
required: true
type: boolean
default: true
buildAutoNSubstitute:
description: "Build AutoNSubstitute"
description: 'Build AutoNSubstitute'
required: true
type: boolean
default: true
buildAutoFakeItEasy:
description: "Build AutoFakeItEasy"
description: 'Build AutoFakeItEasy'
required: true
type: boolean
default: true
environment:
description: "Environment"
description: 'Environment'
type: environment
required: true
default: prod
push:
branches:
- "master" # Run the workflow when pushing to the master branch
pull_request:
branches:
- "*" # Run the workflow for all pull requests
paths-ignore:
- "**.md"
- "**.png"
types: [opened, synchronize, reopened]

env:
DOTNET_NOLOGO: true
Expand Down Expand Up @@ -71,7 +76,7 @@ jobs:
- name: 🗜️ install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: "5.x"
versionSpec: '5.x'
- name: 🎱 determine version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: "CodeQL"
name: 'CodeQL: Semantic code analysis'

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
paths:
- 'src/**'
- '.github/workflows/codeql.yml'
types: [opened, synchronize, reopened]
push:
branches:
- 'master'
paths:
- 'src/**'
- '.github/workflows/codeql.yml'
schedule:
- cron: '20 23 * * 0'
workflow_dispatch:

env:
DOTNET_NOLOGO: true
Expand Down Expand Up @@ -47,4 +54,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
category: '/language:${{matrix.language}}'
17 changes: 8 additions & 9 deletions .github/workflows/fossa-scan.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: fossa-scan
name: 'FOSSA: License & security scan'

on:
push:
branches:
- "master" # Run the workflow when pushing to the master branch
pull_request:
paths:
- 'src/**'
- '.github/workflows/fossa-scan.yml'
pull_request:
- '.github/workflows/fossa-scan.yml'
types: [opened, synchronize, reopened]
push:
branches:
- "*" # Run the workflow for all pull requests
- 'master'
paths:
- 'src/**'
- '.github/workflows/fossa-scan.yml'
- '.github/workflows/fossa-scan.yml'
workflow_dispatch:

jobs:
fossa-scan:
Expand All @@ -22,4 +22,3 @@ jobs:
- uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}

30 changes: 16 additions & 14 deletions .github/workflows/test-mutations.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: test-mutations
name: 'Stryker.NET: Mutation testing'

on:
workflow_dispatch:
push:
branches:
- "master" # Run the workflow when pushing to the master branch
paths-ignore:
- "**.md"
- "**.png"
pull_request:
paths:
- 'src/**'
- 'stryker-config.yml'
- '.github/workflows/test-mutations.yml'
- '.github/actions/materialize-signing-key/**'
types: [opened, synchronize, reopened]
push:
branches:
- "*" # Run the workflow for all pull requests
paths-ignore:
- "**.md"
- "**.png"
- 'master'
paths:
- 'src/**'
- 'stryker-config.yml'
- '.github/workflows/test-mutations.yml'
- '.github/actions/materialize-signing-key/**'
workflow_dispatch:

env:
DOTNET_NOLOGO: true
Expand Down Expand Up @@ -44,9 +47,8 @@ jobs:
- name: 👾 test mutations
working-directory: ./src
run: |
dotnet tool run dotnet-stryker -f stryker-config.yaml -r dashboard -v ${{ github.ref_name }} --dashboard-api-key ${{ secrets.STRYKER_API_KEY }}
dotnet tool run dotnet-stryker -f ../stryker-config.yml -r dashboard -v ${{ github.ref_name }} --dashboard-api-key ${{ secrets.STRYKER_API_KEY }}
env:
CI: true
StrongNameKey: ${{ secrets.SIGNING_KEY }}
StrongNameKeyPath: ${{ steps.signing-key.outputs.file-path }}

File renamed without changes.

0 comments on commit 19fb518

Please sign in to comment.