-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (121 loc) · 4.24 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "yarn"
cache-dependency-path: yarn.lock
- run: yarn
- run: yarn test
integration:
strategy:
matrix:
runner:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- run: ./bin/validate-inputs
- id: setup-hlint
uses: ./
with:
name: "hlint"
version: "3.5"
url: "https://github.com/ndmitchell/{name}/releases/download/v{version}/{name}-{version}-{arch}-{os}.{ext}"
subdir: "{name}-{version}"
os-darwin: osx
os-win32: windows
arch: x86_64
- run: ls -l '${{ steps.setup-hlint.outputs.directory }}'
- if: ${{ matrix.runner != 'windows-latest' }} # it's .exe on win32
run: ls -l '${{ steps.setup-hlint.outputs.file }}'
- run: hlint --version
# Same, with inferred version
- id: setup-hlint-latest
uses: ./
with:
name: "hlint"
url: "https://github.com/ndmitchell/{name}/releases/download/v{version}/{name}-{version}-{arch}-{os}.{ext}"
subdir: "{name}-{version}"
os-darwin: osx
os-win32: windows
arch: x86_64
- run: ls -l '${{ steps.setup-hlint-latest.outputs.directory }}'
- if: ${{ matrix.runner != 'windows-latest' }} # it's .exe on win32
run: ls -l '${{ steps.setup-hlint-latest.outputs.file }}'
- run: hlint --version
- id: setup-dms
uses: ./
with:
name: dms
version: latest
url: "https://releases.deadmanssnitch.com/field-agent/{version}/{name}_{os}_{arch}.{ext}"
os-darwin: macos
os-win32: windows
arch: amd64
- run: ls -l '${{ steps.setup-dms.outputs.directory }}'
- if: ${{ matrix.runner != 'windows-latest' }}
run: ls -l '${{ steps.setup-hlint.outputs.file }}'
- run: dms --version
- id: setup-pandoc
uses: ./
with:
name: pandoc
version: 2.19.2
url: "https://github.com/jgm/{name}/releases/download/{version}/{name}-{version}-{os}-{arch}.{ext}"
url-darwin: "https://github.com/jgm/{name}/releases/download/{version}/{name}-{version}-macOS.zip"
subdir: "{name}-{version}/bin"
subdir-win32: "{name}-{version}"
os-win32: windows
arch: x86_64
arch-linux: amd64
- run: ls -l '${{ steps.setup-pandoc.outputs.directory }}'
- if: ${{ matrix.runner != 'windows-latest' }}
run: ls -l '${{ steps.setup-hlint.outputs.file }}'
- run: pandoc --version
- if: ${{ matrix.runner == 'ubuntu-latest' }}
uses: ./
with:
name: bluebook
version: 1.0.0.0
url: "https://github.com/pbrisbin/{name}/releases/download/v{version}/{name}-{os}-{arch}"
no-extract: "true"
- if: ${{ matrix.runner == 'ubuntu-latest' }}
run: bluebook --help
# Test inferring "latest"
- if: ${{ matrix.runner == 'ubuntu-latest' }}
uses: ./
with:
name: bluebook
url: "https://github.com/pbrisbin/{name}/releases/download/v{version}/{name}-{os}-{arch}"
no-extract: "true"
- if: ${{ matrix.runner == 'ubuntu-latest' }}
run: bluebook --help
#
# Random example from Freckle, that's a private repo. TODO: skip in
# forks.
#
# Skipping for now because the token has expired
# - if: ${{ matrix.runner == 'ubuntu-latest' && github.actor != 'dependabot[bot]' }}
# uses: ./
# with:
# name: platform
# version: 2.4.0.2
# url: "https://github.com/freckle/{name}/releases/download/v{version}/{name}-{arch}-{os}.{ext}"
# github-token: ${{ secrets.PLATFORM_GITHUB_TOKEN }}
# arch: x86_64
# subdir: "{name}"
# - if: ${{ matrix.runner == 'ubuntu-latest' && github.actor != 'dependabot[bot]' }}
# run: platform version