-
Notifications
You must be signed in to change notification settings - Fork 6
79 lines (69 loc) · 2.35 KB
/
ci.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
name: ci
on:
push:
branches:
- "master"
pull_request: {}
env:
HADOLINT_VERSION: "2.4.1"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm install
- run: npx rome check
e2e:
strategy:
matrix:
# TODO
# e2e on Windows is not working in CI
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v2
name: .vscode-test cache
id: vscode-test-cache
with:
path: .vscode-test
key: ${{ runner.os }}-vscode-test
restore-keys: |
${{ runner.os }}-vscode-test
- run: npm install
- run: |
echo "${GITHUB_WORKSPACE}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: runner.os == 'Windows'
- run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
if: runner.os != 'Windows'
- run: |
curl -L --output "hadolint.exe" https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Windows-x86_64.exe
if: runner.os == 'Windows'
- run: |
mkdir -p $GITHUB_WORKSPACE/bin
curl -L -o $GITHUB_WORKSPACE/bin/hadolint https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-x86_64
chmod +x $GITHUB_WORKSPACE/bin/hadolint
if: runner.os == 'Linux'
- run: |
mkdir -p $GITHUB_WORKSPACE/bin
curl -L -o $GITHUB_WORKSPACE/bin/hadolint https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Darwin-x86_64
chmod +x $GITHUB_WORKSPACE/bin/hadolint
if: runner.os == 'macOS'
- uses: GabrielBB/xvfb-action@v1
with:
run: npm test