Skip to content

Commit 6a83097

Browse files
ci: update workflows (#174)
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f19cd6d commit 6a83097

18 files changed

Lines changed: 995 additions & 915 deletions

.github/workflows/arm-bicep-e2e-PR-v2.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/arm-bicep-e2e-v2.yaml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/az-mpf-ci.yaml

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
22
---
33
# Terraform Provider testing workflow.
4-
name: 🧪 mpf-ci
4+
name: CI
55

66
# This GitHub action runs your tests for each pull request.
77
# Optionally, you can turn it on using a schedule for regular testing.
88
on:
9+
push:
10+
branches:
11+
- main
912
pull_request:
1013
branches:
1114
- main
1215
types:
1316
- opened
1417
- synchronize
18+
merge_group:
1519
# schedule:
1620
# - cron: "0 2 * * *"
1721
workflow_dispatch:
1822

19-
# concurrency:
20-
# group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref || null, github.head_ref || null) }}
21-
# cancel-in-progress: true
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25+
cancel-in-progress: true
2226

23-
# env:
27+
env:
28+
CLI_VERSION: ${{ github.sha }}
2429

25-
permissions:
26-
id-token: write
27-
contents: read
28-
pull-requests: read
30+
permissions: {}
2931

3032
jobs:
31-
lintGo:
32-
name: Go lint
33+
lint-go:
34+
name: 🧹 Lint Go
3335
runs-on: ubuntu-24.04
3436
timeout-minutes: 10
3537
permissions:
@@ -38,6 +40,8 @@ jobs:
3840
steps:
3941
- name: ⤵️ Checkout
4042
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
43+
with:
44+
persist-credentials: false
4145

4246
- name: 🚧 Setup Go
4347
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
@@ -46,9 +50,7 @@ jobs:
4650
cache: true
4751

4852
- name: 🚧 Setup Task
49-
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
50-
with:
51-
repo-token: ${{ github.token }}
53+
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
5254

5355
- name: 🔀 Get dependencies
5456
run: task deps
@@ -67,14 +69,17 @@ jobs:
6769
skip-save-cache: true
6870
problem-matchers: true
6971

70-
linkMarkdowns:
71-
name: 📃 Lint Markdown
72+
lint-markdown:
73+
name: 🧹 Lint Markdown
7274
runs-on: ubuntu-24.04
75+
timeout-minutes: 10
7376
permissions:
7477
contents: read
7578
steps:
7679
- name: ⤵️ Checkout
7780
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
81+
with:
82+
persist-credentials: false
7883

7984
- name: 🚧 Setup Go
8085
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
@@ -83,9 +88,7 @@ jobs:
8388
cache: true
8489

8590
- name: 🚧 Setup Task
86-
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
87-
with:
88-
repo-token: ${{ github.token }}
91+
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
8992

9093
- name: 🔨 Setup tools
9194
run: |
@@ -97,11 +100,14 @@ jobs:
97100
build:
98101
name: 🏗️ Build
99102
runs-on: ubuntu-24.04
103+
timeout-minutes: 10
100104
permissions:
101105
contents: read
102106
steps:
103107
- name: ⤵️ Checkout
104108
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
109+
with:
110+
persist-credentials: false
105111

106112
- name: 🚧 Setup Go
107113
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
@@ -110,31 +116,31 @@ jobs:
110116
cache: true
111117

112118
- name: 🚧 Setup Task
113-
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
114-
with:
115-
repo-token: ${{ github.token }}
119+
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
116120

117121
- name: 🔀 Get dependencies
118122
run: task deps:download
119123

120124
- name: 🔨 Setup Build tools
121-
run: task build:mpf
125+
run: task install:goreleaser
122126

123-
# - name: 🏗️ Build
124-
# run: task build
127+
- name: 🏗️ Build
128+
run: task build
125129

126130
test:
127-
name: 🧪 Run Unit Tests
131+
name: 🧪 Unit Tests
128132
runs-on: ubuntu-24.04
133+
timeout-minutes: 20
129134
permissions:
130135
contents: read
131-
pull-requests: write
136+
pull-requests: read
132137
checks: write
133138
steps:
134139
- name: ⤵️ Checkout
135140
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
136141
with:
137142
fetch-depth: 0
143+
persist-credentials: false
138144

139145
- name: 🚧 Setup Go
140146
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
@@ -143,9 +149,7 @@ jobs:
143149
cache: true
144150

145151
- name: 🚧 Setup Task
146-
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
147-
with:
148-
repo-token: ${{ github.token }}
152+
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
149153

150154
- name: 🔀 Download Go dependencies
151155
run: task deps:download
@@ -158,7 +162,7 @@ jobs:
158162

159163
- name: 📤 Upload unit test results
160164
if: always()
161-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
165+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
162166
with:
163167
name: ${{ format('{0}-test-results', env.CLI_VERSION) }}
164168
path: testresults.json
@@ -167,7 +171,7 @@ jobs:
167171

168172
- name: 📤 Upload unit test coverage results
169173
if: always()
170-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
174+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
171175
with:
172176
name: ${{ format('{0}-test-coverage-results', env.CLI_VERSION) }}
173177
path: |
@@ -200,11 +204,11 @@ jobs:
200204
hide_complexity: false
201205
indicators: true
202206
output: both
203-
thresholds: "30 60"
207+
thresholds: 30 60
204208

205209
- name: 📤 Upload unit Coverage summary
206210
if: always()
207-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
211+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
208212
with:
209213
name: ${{ format('{0}-test-coverage-summary', env.CLI_VERSION) }}
210214
path: |

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ on:
1010
permissions: {}
1111

1212
jobs:
13-
main:
13+
dependency-review:
1414
name: 🕵️ Check Dependency
1515
runs-on: ubuntu-24.04
16+
timeout-minutes: 10
1617
permissions:
1718
contents: read
1819
pull-requests: write

0 commit comments

Comments
 (0)