Skip to content

Commit 2e3f378

Browse files
authored
Merge pull request #327 from dafyddj/ci/workflows
ci(workflows): add testing for some platforms to GitHub Actions
2 parents 91e2b2f + 7eb8b73 commit 2e3f378

File tree

2 files changed

+52
-6
lines changed

2 files changed

+52
-6
lines changed

.github/workflows/main.yml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# yamllint disable rule:comments
32
name: Test & release
43

54
'on':
@@ -20,14 +19,12 @@ jobs:
2019
should-run: ${{ steps.action.outputs.should-run }}
2120
steps:
2221
- id: action
23-
uses:
24-
# yamllint disable-line rule:line-length
25-
techneg-it/should-workflow-run@dcbb88600d59ec2842778ef1e2d41f680f876329 # v1.0.0
22+
# yamllint disable-line rule:line-length
23+
uses: techneg-it/should-workflow-run@dcbb88600d59ec2842778ef1e2d41f680f876329 # v1.0.0
2624
pre-commit:
2725
name: Lint / `pre-commit`
2826
needs: should-run
2927
if: fromJSON(needs.should-run.outputs.should-run)
30-
# yamllint disable-line rule:line-length
3128
container: techneg/ci-pre-commit:v2.4.25@sha256:ff5192e893c1079fbf70e3ce6bfc3773815041786a75659793158be930ba7803
3229
runs-on: ubuntu-latest
3330
timeout-minutes: 5
@@ -49,6 +46,46 @@ jobs:
4946
git config --global --add safe.directory $(pwd)
5047
pre-commit run --all-files --color always --verbose
5148
pre-commit run --color always --hook-stage manual commitlint-ci
49+
test:
50+
name: Test / Kitchen
51+
needs:
52+
- pre-commit
53+
- should-run
54+
if: fromJSON(needs.should-run.outputs.should-run)
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 15
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
platform:
61+
- debian-12-master
62+
- debian-11-master
63+
- ubuntu-2404-master
64+
- ubuntu-2204-master
65+
- ubuntu-2004-master
66+
- debian-12-3007-4
67+
- debian-11-3007-4
68+
- ubuntu-2404-3007-4
69+
- ubuntu-2204-3007-4
70+
- ubuntu-2004-3007-4
71+
- debian-12-3006-12
72+
- debian-11-3006-12
73+
- ubuntu-2404-3006-12
74+
- ubuntu-2204-3006-12
75+
- ubuntu-2004-3006-12
76+
steps:
77+
- name: Debug on runner (When re-run with "Enable debug logging" checked)
78+
if: runner.debug
79+
uses: mxschmitt/action-tmate@7b6a61a73bbb9793cb80ad69b8dd8ac19261834c # v3.22
80+
with:
81+
detached: true
82+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
83+
- uses: ruby/[email protected]
84+
with:
85+
bundler-cache: true
86+
ruby-version: '3.1'
87+
- run: |
88+
bin/kitchen verify ${{ matrix.platform }}
5289
results:
5390
name: Release / Collect results
5491
permissions:
@@ -59,7 +96,13 @@ jobs:
5996
# yamllint disable-line rule:line-length
6097
- uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
6198
with:
62-
ignore: Release / Collect results
99+
ignore: >
100+
Release / Collect results,
101+
Test / Kitchen (debian-12-master),
102+
Test / Kitchen (debian-11-master),
103+
Test / Kitchen (ubuntu-2404-master),
104+
Test / Kitchen (ubuntu-2204-master),
105+
Test / Kitchen (ubuntu-2004-master),
63106
ignore_pattern: ^GitLab CI
64107
token: ${{ secrets.GITHUB_TOKEN }}
65108
- run: echo "::notice ::Workflow success!"

.yamllint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
extends: 'default'
66

77
rules:
8+
comments:
9+
min-spaces-from-content: 1
810
empty-values:
911
forbid-in-block-mappings: true
1012
forbid-in-flow-mappings: true
1113
line-length:
1214
# Increase from default of `80`
1315
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
1416
max: 88
17+
allow-non-breakable-inline-mappings: true
1518
octal-values:
1619
forbid-implicit-octal: true
1720
forbid-explicit-octal: true

0 commit comments

Comments
 (0)