Skip to content

Commit

Permalink
Add concurrency groups, update linter state
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric authored and titpetric committed Sep 24, 2024
1 parent 51d9579 commit d16a259
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 42 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/api-changes.yml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ on:
- master
- release-**

# Only have one runner per PR, and per merged commit.
#
# - As a PR gets new commits, any old run jobs get cancelled (PR number)
# - As a commit gets merged, it doesn't cancel previous running PR's (github.sha)
concurrency:
group: ${{ github.event.pull_request.number || github.sha }}-ci-tests
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
PYTHON_VERSION: "3.11"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
schedule:
- cron: '0 18 * * 4'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
analyze:
name: Analyze
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/jira-lint.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/lint-swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
paths:
- 'swagger.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
redocly_validator:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -41,7 +45,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
go-version: stable

- name: Install dyff binary
run: |
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yamllint disable rule:truthy
---
name: CI lint

on:
pull_request:
branches:
- master
- release-**
push:
branches:
- master
- release-**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
godoc:
if: ${{ !github.event.pull_request.draft }}
uses: TykTechnologies/github-actions/.github/workflows/godoc.yml@main
secrets:
ORG_GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}
with:
go-version: stable

jira:
if: ${{ !github.event.pull_request.draft }}
uses: TykTechnologies/github-actions/.github/workflows/jira-lint.yaml@main
secrets:
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
ORG_GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/plugin-compiler-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
env:
GOLANG_CROSS: 1.22-bullseye

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
docker-build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
# - Cloudsmith

name: Release

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

on:
# Trigger release every monday at midnight for master CI images
schedule:
Expand Down

0 comments on commit d16a259

Please sign in to comment.