-
Notifications
You must be signed in to change notification settings - Fork 24
85 lines (70 loc) · 2.21 KB
/
test-action.yml
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
82
83
84
85
name: Test Action
on:
workflow_dispatch:
push:
branches:
- "**"
# A pull request sent from a fork of the upstream repository could be manipulated to do harmful things.
# The upstream repository’s maintainer would have no protection against this attack, as pull requests
# can be sent by anyone who forks the repository on GitHub.
# This is why we don't run automated tests on every PR.
# pull_request:
# types:
# - opened
# - synchronize
# paths-ignore:
# - '*.md'
jobs:
skipci:
runs-on: ubuntu-22.04
steps:
- run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
test:
runs-on: ${{ matrix.os }}
if: contains(github.event.head_commit.message, '[skip ci]') == false
strategy:
max-parallel: 1
matrix:
os:
- "ubuntu-22.04"
- "macos-latest"
- "windows-latest"
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: npm ci
- name: Remove lint-staged husky
run: |
npm uninstall lint-staged husky
git checkout package-lock.json package.json
- run: npm run build
- name: Install specific Terragrunt version
uses: ./
with:
terragrunt-version: 0.54.0
- name: Validate specific version
run: terragrunt --version
- name: Install latest Terragrunt version
uses: ./
with:
terragrunt-version: latest
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate latest
run: terragrunt --version
- name: Install Terragrunt with version file specified version
uses: ./
with:
terragrunt-version-file: .terragrunt-version
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate version file specified version
run: terragrunt --version
- name: Install Terragrunt with version file latest
uses: ./
with:
terragrunt-version-file: .terragrunt-version-latest
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate version file latest
run: terragrunt --version