-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.16 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging
workflow_dispatch:
inputs:
nussknacker_version:
description: "Nussknacker version"
required: false
type: string
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache ivy packages
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-ivy2-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-sbt
- uses: olafurpg/setup-scala@v10
with:
java-version: "[email protected]"
- name: Run Tests for Nussknacker version from workflow dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
NUSSKNACKER_VERSION: ${{ github.event.inputs.nussknacker_version }}
run: sbt "set ThisBuild / nussknackerV := \"$NUSSKNACKER_VERSION\"" +test it:test
- name: Run Tests for Nussknacker version from branch
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sbt +test it:test