-
Notifications
You must be signed in to change notification settings - Fork 30
80 lines (78 loc) · 3.45 KB
/
nightly-workflow-older.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: WildFly galleon plugins - Nightly WildFly backward compatibility - Build -Dquickly + tests, used for WF30 and WF31
on:
workflow_call:
inputs:
wildfly-ref:
description: "WildFly branch/tag"
required: false
default: "main"
type: string
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
test-galleon-plugins:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['11', '17']
name: Build test Galleon Plugins
runs-on: ${{ matrix.os }}
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
steps:
- name: Checkout WildFly Galleon Plugins
uses: actions/checkout@v4
with:
path: galleon-plugins
- name: Checkout WildFly
uses: actions/checkout@v4
with:
ref: ${{ inputs.wildfly-ref }}
repository: wildfly/wildfly
path: wildfly
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build and Test Galleon plugins on ${{ matrix.java }}
run: mvn -U -B -ntp clean install
shell: bash
working-directory: galleon-plugins
- id: version
run: |
echo "galleon-plugins-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_ENV
echo "galleon-version=$(mvn -B help:evaluate -Dexpression=version.org.jboss.galleon -DforceStdout -q)" >> $GITHUB_ENV
working-directory: galleon-plugins
- name: Build WildFly (skip preview and do not run tests)
run: mvn -B clean install -Dquickly -Dversion.org.wildfly.glow=1.0.0.Final -Dversion.org.wildfly.plugin=5.0.0.Final -Dversion.org.jboss.galleon=${{env.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{env.galleon-plugins-version}}
shell: bash
working-directory: wildfly
- name: WildFly tests
run: |
cd testsuite
mvn -B -fae clean install -Dversion.org.wildfly.glow=1.0.0.Final -Dversion.org.wildfly.plugin=5.0.0.Final -Dversion.org.jboss.galleon=${{env.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{env.galleon-plugins-version}}
shell: bash
working-directory: wildfly
# We can't run the -Dts.layers tests, they do enable preview tests with no way to disable them
#- name: WildFly -Dts.layers tests
# run: |
# cd testsuite
# mvn -B -fae clean install -Dno.preview.integration.tests=true -Dts.layers -Dversion.org.wildfly.glow=1.0.0.Final -Dversion.org.wildfly.plugin=5.0.0.Final -Dversion.org.jboss.galleon=${{env.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{env.galleon-plugins-version}}
# shell: bash
# working-directory: wildfly