-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (62 loc) · 1.76 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
name: Test
on:
push:
branches-ignore:
- 'renovate/**'
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [windows, macos, ubuntu]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
path: 'action'
- name: Trick Renovate
id: trick
shell: bash
run: |
# Idea: the regex matcher of Renovate keeps this string up to date automatically
# The version is extracted and used to access the correct version of the scripts
USES=$(cat <<TRICK_RENOVATE
- uses: DanySK/Template-for-Gradle-Plugins@5801af5c692229d4040bf32f23a58b1792c60f42
TRICK_RENOVATE
)
echo "Scripts update line: \"$USES\""
echo "Computed version: \"${USES#*@}\""
echo "::set-output name=version::${USES#*@}"
- name: Checkout test repo
uses: actions/checkout@v3.1.0
with:
repository: DanySK/Template-for-Gradle-Plugins
path: 'target'
ref: ${{ steps.trick.outputs.version }}
- uses: ./action
with:
build-command: ./gradlew tasks
check-command: true
working-directory: target
should-run-codecov: false
clean-command: ./gradlew clean
- uses: ./action
with:
working-directory: target
should-run-codecov: false
release:
if: github.event_name == 'push'
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npx semantic-release