File tree 5 files changed +31
-2
lines changed
scalafix/src/main/scala/org/scalajs/dom/scalafix
5 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,28 @@ jobs:
21
21
env :
22
22
SCALAJS_VERSION : " ${{ matrix.scalajsversion == '0.6.x' && '0.6.28' || '' }}"
23
23
steps :
24
+
24
25
- uses : actions/checkout@v2
25
26
- uses : olafurpg/setup-scala@v13
26
27
with :
27
28
28
29
- uses : coursier/cache-action@v6
30
+
29
31
- name : Build
30
32
run : sbt "++${{ matrix.scalaversion }}" package
33
+
31
34
- name : Test generate documentation
32
35
run : sbt "++${{ matrix.scalaversion }}" doc
36
+
33
37
- name : Build examples
34
38
run : sbt "++${{ matrix.scalaversion }}" example/compile
35
- - name : scalafmt
39
+
40
+ - name : Validate formatting
36
41
run : sbt "++${{ matrix.scalaversion }}" scalafmtCheck
37
42
43
+ - name : Validate api report
44
+ run : ./api-reports/validate "${{ matrix.scalaversion }}"
45
+
38
46
readme :
39
47
runs-on : ubuntu-latest
40
48
steps :
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+ cd " $( dirname " $0 " ) "
4
+
5
+ [ $# -ne 1 ] && echo " Usage: $0 <scala version>" && exit 1
6
+
7
+ series=" ${1% .* } "
8
+ file=" ${series/ ./ _} .txt"
9
+ echo -n " Validating $file ... "
10
+
11
+ help=' Run `sbt +compile` and check in the differences to the ' " $( basename " $0 " ) directory"
12
+
13
+ if [ ! -e " $file " ]; then
14
+ echo " file not found. $help "
15
+ exit 2
16
+ elif [ -n " $( git status --porcelain -- " $file " ) " ]; then
17
+ echo " out-of-date. $help "
18
+ exit 3
19
+ else
20
+ echo " ok"
21
+ fi
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class GenerateApiReport extends SemanticRule("GenerateApiReport") {
100
100
private def saveReport (): Unit = {
101
101
val scalaVer = Util .scalaSeriesVer.replace('.' , '_' )
102
102
val projectRoot = System .getProperty(" user.dir" )
103
- val reportFile = Paths .get(s " $projectRoot/api- $scalaVer.txt " )
103
+ val reportFile = Paths .get(s " $projectRoot/api-reports/ $scalaVer.txt " )
104
104
val api = state.result().iterator.map(_.stripPrefix(" org/scalajs/dom/" )).mkString(" \n " )
105
105
106
106
val content =
You can’t perform that action at this time.
0 commit comments