-
Notifications
You must be signed in to change notification settings - Fork 14
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 #3275 from Opetushallitus/ci-refactor
TOR-2277 Deploy putken refaktorointi
- Loading branch information
Showing
9 changed files
with
340 additions
and
700 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,53 @@ | ||
name: "Build Koski app + tests" | ||
inputs: | ||
commithash: | ||
required: true | ||
type: string | ||
description: "Commit hash to build" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Lookup existing target dir cache | ||
id: lookup | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: target/ | ||
key: ${{ runner.os }}-target-${{ inputs.commithash }} | ||
lookup-only: "true" | ||
- uses: actions/checkout@v4 | ||
if: steps.lookup.outputs.cache-hit != 'true' | ||
with: | ||
ref: ${{ inputs.commithash }} | ||
- name: Set up Java 11 | ||
if: steps.lookup.outputs.cache-hit != 'true' | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "11" | ||
architecture: "x64" | ||
distribution: "zulu" | ||
- name: Cache Maven packages | ||
if: steps.lookup.outputs.cache-hit != 'true' | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Cache Node modules | ||
if: steps.lookup.outputs.cache-hit != 'true' | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Build Koski app + tests | ||
if: steps.lookup.outputs.cache-hit != 'true' | ||
run: mvn test -DskipTests=true --batch-mode | ||
shell: bash | ||
- name: Cache target dir | ||
if: steps.lookup.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: target/ | ||
key: ${{ runner.os }}-target-${{ inputs.commithash }} |
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
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
Oops, something went wrong.