-
Notifications
You must be signed in to change notification settings - Fork 11
51 lines (46 loc) · 1.31 KB
/
pr-scala.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
46
47
48
49
50
51
# Based on https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html
# optimization: https://github.com/marketplace/actions/skip-duplicate-actions#usage-examples
name: Compiler tests
on:
push:
branches:
- "master"
pull_request:
types: [assigned, opened, synchronize, reopened, ready_for_review]
jobs:
pre_job:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["compiler/**"]'
sbt:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
- uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: install dependencies
run: pip install -r requirements.txt
- name: sbt test
run: cd compiler && sbt -v +test
scalafmt-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checking the code with scalafmt
uses: AvaPL/scalafmt-native-formatter@v0
with:
conf-path: compiler/.scalafmt.conf