mirror of
https://github.com/s4u/setup-maven-action.git
synced 2026-02-13 00:05:10 +08:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47c2778e48 | |||
| 18ed4916ce | |||
| a2f82a8171 | |||
| f0c6d72092 | |||
| fccb401913 | |||
| 440eda18c7 | |||
| 44b3adc17b | |||
| 8d6de218c6 | |||
| 421a3d288e | |||
| 00510bfd43 | |||
| 8693beee3c | |||
| 9589d5648d | |||
| d27f7bad34 | |||
| 07db3fb4b2 | |||
| 3a36aae9ec | |||
| b8af8b0ed8 | |||
| 336767f6a6 | |||
| 078175723e | |||
| 38506fd243 | |||
| 41d4657217 | |||
| e9a7bdc6d6 | |||
| b3d576e79a |
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
@ -11,10 +11,6 @@ on:
|
||||
schedule:
|
||||
- cron: '22 23 * * 5'
|
||||
|
||||
concurrency:
|
||||
group: test-action
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@ -22,14 +18,14 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ 'ubuntu-latest', 'windows-latest', 'macOS-latest' ]
|
||||
java: [ '8', '11', '16' ]
|
||||
maven: [ '3.5.4', '3.6.3', '3.8.2' ]
|
||||
java: [ '8', '11', '17' ]
|
||||
maven: [ '3.5.4', '3.6.3', '3.8.4' ]
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/checkout@v2.4.0
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
@ -40,3 +36,23 @@ jobs:
|
||||
- run: mvn -V validate -Drequire.java=${{ matrix.java }} -Drequire.maven=${{ matrix.maven }}
|
||||
shell: bash
|
||||
|
||||
test-deault:
|
||||
name: Test with defaults
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
java-version: 8
|
||||
|
||||
- run: mvn -V validate -Drequire.java=8 -Drequire.maven=3.8.3
|
||||
shell: bash
|
||||
|
||||
test-ok:
|
||||
name: Test OK
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ test, test-deault ]
|
||||
steps:
|
||||
- run: echo OK
|
||||
|
||||
@ -66,7 +66,7 @@ So we can use for action:
|
||||
|
||||
| params | destination | default |
|
||||
| ------------- |-------------- |-------- |
|
||||
| maven-version | maven-version | 3.8.1 |
|
||||
| maven-version | maven-version | 3.8.3 |
|
||||
|
||||
## maven-settings-action
|
||||
|
||||
|
||||
30
action.yml
30
action.yml
@ -40,7 +40,7 @@ inputs:
|
||||
# maven version
|
||||
maven-version:
|
||||
description: 'The Maven version to set up'
|
||||
default: '3.8.1'
|
||||
default: '3.8.3'
|
||||
required: false
|
||||
|
||||
# maven settings.xml
|
||||
@ -65,51 +65,31 @@ runs:
|
||||
|
||||
steps:
|
||||
|
||||
- run: echo "::group::Checkout"
|
||||
shell: bash
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
||||
- run: echo "::endgroup::"
|
||||
shell: bash
|
||||
|
||||
- run: echo "::group::Setup Java"
|
||||
shell: bash
|
||||
- uses: actions/setup-java@v2.3.0
|
||||
- uses: actions/setup-java@v2.4.0
|
||||
with:
|
||||
overwrite-settings: false
|
||||
java-version: '${{ inputs.java-version }}'
|
||||
distribution: '${{ inputs.java-distribution }}'
|
||||
- run: echo "::endgroup::"
|
||||
shell: bash
|
||||
|
||||
- run: echo "::group::Setup Cache"
|
||||
shell: bash
|
||||
- uses: actions/cache@v2.1.6
|
||||
- uses: actions/cache@v2.1.7
|
||||
with:
|
||||
path: |
|
||||
${{ inputs.cache-path }}
|
||||
${{ inputs.cache-path-add }}
|
||||
key: ${{ inputs.cache-prefix }}${{ runner.os }}-jdk${{ inputs.java-version }}-${{ inputs.java-distribution }}-maven${{ inputs.maven-version }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ inputs.cache-prefix }}${{ runner.os }}-jdk${{ inputs.java-version }}-${{ inputs.java-distribution }}-maven${{ inputs.maven-version }}-
|
||||
- run: echo "::endgroup::"
|
||||
shell: bash
|
||||
|
||||
- run: echo "::group::Setup Maven Version"
|
||||
shell: bash
|
||||
- uses: stCarolas/setup-maven@v4.1
|
||||
- uses: stCarolas/setup-maven@v4.2
|
||||
with:
|
||||
maven-version: '${{ inputs.maven-version }}'
|
||||
- run: echo "::endgroup::"
|
||||
shell: bash
|
||||
|
||||
- run: echo "::group::Prepare Maven settings.xml"
|
||||
shell: bash
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
servers: '${{ inputs.settings-servers}}'
|
||||
mirrors: '${{ inputs.settings-mirrors}}'
|
||||
properties: '${{ inputs.settings-properties}}'
|
||||
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots}}'
|
||||
- run: echo "::endgroup::"
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user