Skip to content

Commit

Permalink
Kosken compilointi erilliseen jobiin
Browse files Browse the repository at this point in the history
  • Loading branch information
a544jh committed Jan 9, 2025
1 parent 1a6d590 commit 6710bcd
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/actions/setup_backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ runs:
run: docker compose --progress quiet up -d
shell: bash

- name: Compile tests
uses: nick-fields/retry@v3
- name: Restore target dir
uses: actions/cache/restore@v4
with:
max_attempts: 1
timeout_minutes: 20
command: mvn test-compile --batch-mode
path: "target/"
key: ${{ runner.os }}-target-${{ github.event.inputs.commithash }}
49 changes: 48 additions & 1 deletion .github/workflows/all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,44 @@ env:
TZ: Europe/Helsinki

jobs:
build_koski:
name: Build Koski app
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v4

- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: "11"
architecture: "x64"
distribution: "zulu"

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Build Koski
run: mvn test -DskipTests=true --batch-mode
- name: Cache target dir
uses: actions/cache/save@v4
with:
path: target/
key: ${{ runner.os }}-target-${{ github.event.inputs.commithash }}

lint_koski:
name: Lint Koski
runs-on: ${{ inputs.runs-on }}
Expand All @@ -25,7 +63,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -93,6 +131,7 @@ jobs:
name: Backend (api oppijavalidation)
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_backend_test
Expand All @@ -104,6 +143,7 @@ jobs:
name: Backend (api misc 1/2)
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_backend_test
Expand All @@ -116,6 +156,7 @@ jobs:
name: Backend (api misc 2/2)
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_backend_test
Expand Down Expand Up @@ -173,6 +214,7 @@ jobs:
name: Backend (other 2/4)
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_backend_test
Expand All @@ -185,6 +227,7 @@ jobs:
name: Backend (other 3/4)
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_backend_test
Expand All @@ -206,6 +249,7 @@ jobs:
name: Backend (other 4/4)
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_backend_test
Expand Down Expand Up @@ -234,6 +278,7 @@ jobs:
shardTotal: [7]
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_frontend_test
Expand Down Expand Up @@ -272,6 +317,7 @@ jobs:
shardTotal: [5]
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/koski_frontend_playwright_test
Expand All @@ -288,6 +334,7 @@ jobs:
shardTotal: [6]
runs-on: ${{ inputs.runs-on }}
if: ${{ !contains(github.event.head_commit.message, '[skip-tests]') }}
needs: [build_koski]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/valpas_integration_test
Expand Down

0 comments on commit 6710bcd

Please sign in to comment.