Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mathusanm6 authored Nov 19, 2023
1 parent 5c93be7 commit 3e16f13
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@ name: Java CI
on: [push, pull_request]

jobs:
setup_node:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Cache node modules
id: cache-key
run: echo "::set-output name=key::$(echo \"Node.js\")-$(echo ${{ hashFiles('**/package-lock.json') }})"

build:
needs: setup_node
runs-on: ubuntu-latest

container:
Expand All @@ -28,7 +47,7 @@ jobs:
run: ./run.sh compile

build_test:
needs: build
needs: [setup_node, build]
runs-on: ubuntu-latest

container:
Expand All @@ -47,7 +66,7 @@ jobs:
run: ./run.sh compileTests

test:
needs: build_test
needs: [setup_node, build_test]
runs-on: ubuntu-latest

container:
Expand Down

0 comments on commit 3e16f13

Please sign in to comment.