-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (71 loc) · 2.25 KB
/
test.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
name: Build and test
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build ChangeLog
run: npx conventional-changelog-cli
- run: |
npm install
- run: |
npm run all
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm install
npm run package
- uses: ./
id: go-version-1
with:
working-directory: ./__tests__/testdata
- run: |
test '${{ steps.go-version-1.outputs.module }}' == 'example.com/go/testmodule'
- run: |
test '${{ steps.go-version-1.outputs.go-mod-version }}' == '1.16'
- run: |
test '${{ steps.go-version-1.outputs.minimal }}' == '1.16'
- run: |
test '${{ steps.go-version-1.outputs.latest }}' == '1.21'
- run: |
test '${{ steps.go-version-1.outputs.matrix }}' == '["1.16","1.17","1.18","1.19","1.20","1.21"]'
- uses: ./
id: go-version-2
with:
working-directory: ./__tests__/testdata
unsupported: false
- run: |
test '${{ steps.go-version-2.outputs.module }}' == 'example.com/go/testmodule'
- run: |
test '${{ steps.go-version-2.outputs.go-mod-version }}' == '1.16'
- run: |
test '${{ steps.go-version-2.outputs.minimal }}' == '1.20'
- run: |
test '${{ steps.go-version-2.outputs.latest }}' == '1.21'
- run: |
test '${{ steps.go-version-2.outputs.matrix }}' == '["1.20","1.21"]'
- uses: ./
id: go-version-3
with:
working-directory: ./__tests__/testdata
unsupported: false
patch-level: true
- run: |
test '${{ steps.go-version-3.outputs.module }}' == 'example.com/go/testmodule'
- run: |
test '${{ steps.go-version-3.outputs.go-mod-version }}' == '1.16'
- run: |
test '${{ steps.go-version-3.outputs.minimal }}' == '1.20.7'
- run: |
test '${{ steps.go-version-3.outputs.latest }}' == '1.21.0'
- run: |
test '${{ steps.go-version-3.outputs.matrix }}' == '["1.20.7","1.21.0"]'