forked from voxpupuli/onceover-codequality
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.75 KB
/
Copy pathci.yml
File metadata and controls
81 lines (77 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: "ci"
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- "3.2"
- "4.0"
include:
- ruby_version: "3.2"
puppet_gem_version: "~> 8.0"
- ruby_version: "4.0"
puppet_gem_version: "~> 9.0"
runs_on:
- "ubuntu-latest"
- "macos-latest"
- "ubuntu-24.04-arm"
# NOTE: windows-latest is a separate, bespoke job below, not part of this
# matrix -- see that job for why.
name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{ matrix.puppet_gem_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
secrets: "inherit"
with:
rake_task: "spec"
ruby_version: ${{ matrix.ruby_version }}
puppet_gem_version: ${{ matrix.puppet_gem_version }}
runs_on: ${{ matrix.runs_on }}
spec-windows:
# windows-latest can't use the shared gem_ci.yml: that reusable workflow
# does its own checkout internally, with no hook to set the long-paths
# registry key before r10k's test fixtures get cloned into a deeply
# nested temp path. This repo's own fixtures (e.g. puppetlabs-cron_core's
# acceptance specs) are long enough that D:/a/puppetlabs-onceover/puppetlabs-onceover/...
# crosses Windows' 260-char MAX_PATH without it -- confirmed by
# reproduction, not assumed.
strategy:
fail-fast: false
matrix:
ruby_version:
- "3.2"
- "4.0"
include:
- ruby_version: "3.2"
puppet_gem_version: "~> 8.0"
- ruby_version: "4.0"
puppet_gem_version: "~> 9.0"
name: "spec (windows-latest ruby ${{ matrix.ruby_version }} | puppet ${{ matrix.puppet_gem_version }})"
runs-on: "windows-latest"
env:
PUPPET_GEM_VERSION: ${{ matrix.puppet_gem_version }}
PUPPET_FORGE_TOKEN: ${{ secrets.PUPPET_FORGE_TOKEN || secrets.PUPPET_FORGE_TOKEN_PUBLIC }}
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: "forge-key:${{ secrets.PUPPET_FORGE_TOKEN || secrets.PUPPET_FORGE_TOKEN_PUBLIC }}"
steps:
- uses: "actions/checkout@v4"
- uses: "ruby/setup-ruby@v1"
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: "Enable Windows long paths"
run: |
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1
git config --global core.longpaths true
- name: "rubocop"
run: bundle exec rubocop --format github
- name: "spec"
run: bundle exec rake spec