Skip to content

Commit

Permalink
chore: run sample in ci to ensure it is valid and cancel concurrent i…
Browse files Browse the repository at this point in the history
…n progress actions
  • Loading branch information
latonz committed Aug 10, 2023
1 parent f7c566f commit 2673ff1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ on:
push:
branches:
- main
paths:
- 'src/**'
- 'benchmarks/**'
- 'global.json'
- 'Directory.Build.props'
pull_request:
branches:
- main
paths:
- 'src/**'
- 'benchmarks/**'
- 'global.json'
- 'Directory.Build.props'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
schedule:
- cron: '45 11 * * 6'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
validate:
name:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ on:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,22 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
lint-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3.2.0
- run: dotnet tool restore
- run: dotnet csharpier --check .
# don't run dotnet format for whitespace formatting as this is done by csharpier
- run: dotnet format style --verify-no-changes
- run: dotnet format analyzers --verify-no-changes
superlinter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -31,6 +45,6 @@ jobs:
# exclusions:
# LICENSE: 1:1 copy of the license text
# sln files: Usually edited by the IDE
# AnalyzerReleases.Shipped.md and Analyzer.Unshipped.md: their structure is predefined by it's analyzer
# AnalyzerReleases.Shipped.md and Analyzer.Unshipped.md: their structure is predefined by its analyzer
# _snapshots: Snapshots are generated and should not be linted
FILTER_REGEX_EXCLUDE: 'LICENSE|.*.sln|src/Riok\.Mapperly/AnalyzerReleases\..*\.md|.*_snapshots.*'
10 changes: 2 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
sample:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3.2.0
- run: dotnet tool restore
- run: dotnet csharpier --check .
# don't run dotnet format for whitespace formatting as this is done by csharpier
- run: dotnet format style --verify-no-changes
- run: dotnet format analyzers --verify-no-changes
- run: dotnet run --project ./samples/Riok.Mapperly.Sample
test:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -36,7 +31,6 @@ jobs:
with:
fail_ci_if_error: true
package:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 2673ff1

Please sign in to comment.