-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #328 from pascalgrimaud/github-actions-composite
GitHub Actions: use composite for setup environment
- Loading branch information
Showing
2 changed files
with
36 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Setup' | ||
description: 'Setup environment with Java 17, Node 16.13.1' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Setup: Node.js' | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16.13.1 | ||
- name: 'Setup: update NPM' | ||
shell: bash | ||
run: npm install -g npm | ||
- name: 'Setup: Java 17' | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17.x' | ||
- name: 'Setup: check tools' | ||
shell: bash | ||
run: | | ||
node -v | ||
npm -v | ||
java -version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,9 @@ jobs: | |
steps: | ||
- name: 'Setup: checkout project' | ||
uses: actions/checkout@v2 | ||
- name: 'Setup: Node.js' | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16.13.0 | ||
- name: 'Setup: update npm' | ||
run: npm install -g npm | ||
- name: 'Setup: Java 17' | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17.x' | ||
- name: 'Setup: check tools' | ||
run: | | ||
node -v | ||
npm -v | ||
java -version | ||
- name: 'Setup: environment' | ||
id: setup | ||
uses: ./.github/actions/setup | ||
- name: 'Init: cache local Maven repository' | ||
uses: actions/cache@v2 | ||
with: | ||
|
@@ -63,29 +50,9 @@ jobs: | |
steps: | ||
- name: 'Setup: checkout project' | ||
uses: actions/checkout@v2 | ||
- name: 'Setup: Node.js' | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16.13.0 | ||
- name: 'Setup: update npm' | ||
run: npm install -g npm | ||
- name: 'Setup: Java 17' | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17.x' | ||
- name: 'Setup: check tools' | ||
run: | | ||
node -v | ||
npm -v | ||
java -version | ||
- name: 'Init: cache local Maven repository' | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: 'Setup: environment' | ||
id: setup | ||
uses: ./.github/actions/setup | ||
- name: 'Artifact: download JAR' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
|
@@ -98,6 +65,13 @@ jobs: | |
./generate.sh | ||
ls -al /tmp/beer/ | ||
./stop.sh | ||
- name: 'Init: cache local Maven repository' | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: 'Test: Beer project' | ||
run: | | ||
cd /tmp/beer/ | ||
|