-
Notifications
You must be signed in to change notification settings - Fork 61
65 lines (54 loc) · 1.65 KB
/
setup-test.yaml
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
name: 🔨 Setup Test
on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Test Setups
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Dry Run - No Tool Installed
run: go run .
working-directory: cmd/pdtm/
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Install Run - Setup All The Tools
run: go run . -ia
working-directory: cmd/pdtm/
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Add binaries folder to ENV PATH (Unix-Like)
if: runner.os != 'Windows'
run: go run . -show-path >> $GITHUB_PATH
working-directory: cmd/pdtm/
- name: Add binaries folder to ENV PATH (Windows)
if: runner.os == 'Windows'
run: |
go run . -show-path | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
working-directory: cmd/pdtm/
- name: Checking tools existence
run: |
go run . | grep -v "not installed"
working-directory: cmd/pdtm/
- name: Update Run - Update All The Tools
run: go run . -ua
working-directory: cmd/pdtm/
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Remove Run - Remove All The Tools
run: go run . -ra
working-directory: cmd/pdtm/