|
1 | | -name: Unittests |
2 | | -on: [push] |
3 | | -jobs: |
4 | | - retrieve-scala-versions: |
5 | | - runs-on: ubuntu-20.04 |
6 | | - steps: |
7 | | - - uses: actions/checkout@v2 |
8 | | - - name: Set up JDK 11 |
9 | | - uses: actions/setup-java@v2 |
10 | | - with: |
11 | | - java-version: '11' |
12 | | - distribution: 'adopt' |
13 | | - - name: Retrieve Scala Versions from build.sbt file |
14 | | - id: set-matrix |
15 | | - run: | |
16 | | - scalaVersionPref=$(sbt +scalaBinaryVersion | sed -r 's/[^ \t\r\n\v\f0-9\.]([0-9]\.[0-9]+)/SCALA_VERSION\1/' | grep -oE 'CALA_VERSION[0-9]\.[0-9]+') |
17 | | - scala_versions=$(echo "$scalaVersionPref" | sed -r 's/CALA_VERSION([0-9]\.[0-9]+)/\1/' | tr '\n' ',') |
18 | | - scala_versions="[${scala_versions%?}]" |
19 | | - echo ::set-output name=matrix::"$scala_versions" |
20 | | - outputs: |
21 | | - scala_versions: ${{ steps.set-matrix.outputs.matrix }} |
22 | | - |
23 | | - test-coverage: |
24 | | - runs-on: ubuntu-20.04 |
25 | | - steps: |
26 | | - - uses: actions/checkout@v2 |
27 | | - - name: Set up JDK 11 |
28 | | - uses: actions/setup-java@v2 |
29 | | - with: |
30 | | - java-version: '11' |
31 | | - distribution: 'adopt' |
32 | | - - name: Cache Java modules |
33 | | - uses: actions/cache@v2 |
34 | | - env: |
35 | | - cache-name: cache-java-modules |
36 | | - with: |
37 | | - path: ~/.m2 |
38 | | - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }} |
39 | | - restore-keys: | |
40 | | - ${{ runner.os }}-build-${{ env.cache-name }}- |
41 | | - ${{ runner.os }}-build- |
42 | | - ${{ runner.os }}- |
43 | | - - name: Cache Scala modules |
44 | | - uses: actions/cache@v2 |
45 | | - env: |
46 | | - cache-name: cache-scala-modules |
47 | | - with: |
48 | | - path: ~/.m2 |
49 | | - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }} |
50 | | - restore-keys: | |
51 | | - ${{ runner.os }}-build-${{ env.cache-name }}- |
52 | | - ${{ runner.os }}-build- |
53 | | - ${{ runner.os }}- |
54 | | - - name: Cache Sbt modules |
55 | | - uses: actions/cache@v2 |
56 | | - env: |
57 | | - cache-name: cache-sbt-modules |
58 | | - with: |
59 | | - path: ~/.sbt/1.0 |
60 | | - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }} |
61 | | - restore-keys: | |
62 | | - ${{ runner.os }}-build-${{ env.cache-name }}- |
63 | | - ${{ runner.os }}-build- |
64 | | - ${{ runner.os }}- |
65 | | - - name: Run Sbt Test and Generate Report on Multiple Scala Versions |
66 | | - run: | |
67 | | - sbt +coverage +test |
68 | | - sbt +coverageReport |
69 | | - - uses: actions/upload-artifact@v2 |
70 | | - with: |
71 | | - name: coverage-report |
72 | | - path: ./target/scala-[0-9].[0-9][0-9] |
73 | | - |
74 | | - upload-coverage: |
75 | | - runs-on: ubuntu-latest |
76 | | - needs: [retrieve-scala-versions, test-coverage] |
77 | | - strategy: |
78 | | - fail-fast: false |
79 | | - matrix: |
80 | | - scala_version: ${{ fromJSON(needs.retrieve-scala-versions.outputs.scala_versions) }} |
81 | | - steps: |
82 | | - - uses: actions/checkout@v2 |
83 | | - - uses: actions/download-artifact@v2 |
84 | | - with: |
85 | | - name: coverage-report |
86 | | - path: ./target/ |
87 | | - - uses: codecov/codecov-action@v2 |
88 | | - with: |
89 | | - token: ${{ secrets.CODECOV_TOKEN }} |
90 | | - directory: ./target/scala-${{ matrix.scala_version }}/ |
91 | | - flags: unittests,${{ matrix.scala_version }}/scoverage-report/scoverage.xml |
92 | | - name: codecov-json-logic-scala |
93 | | - fail_ci_if_error: true |
94 | | - verbose: true |
| 1 | +#name: Unittests |
| 2 | +#on: [push] |
| 3 | +#jobs: |
| 4 | +# retrieve-scala-versions: |
| 5 | +# runs-on: ubuntu-20.04 |
| 6 | +# steps: |
| 7 | +# - uses: actions/checkout@v2 |
| 8 | +# - name: Set up JDK 11 |
| 9 | +# uses: actions/setup-java@v2 |
| 10 | +# with: |
| 11 | +# java-version: '11' |
| 12 | +# distribution: 'adopt' |
| 13 | +# - name: Retrieve Scala Versions from build.sbt file |
| 14 | +# id: set-matrix |
| 15 | +# run: | |
| 16 | +# scalaVersionPref=$(sbt +scalaBinaryVersion | sed -r 's/[^ \t\r\n\v\f0-9\.]([0-9]\.[0-9]+)/SCALA_VERSION\1/' | grep -oE 'CALA_VERSION[0-9]\.[0-9]+') |
| 17 | +# scala_versions=$(echo "$scalaVersionPref" | sed -r 's/CALA_VERSION([0-9]\.[0-9]+)/\1/' | tr '\n' ',') |
| 18 | +# scala_versions="[${scala_versions%?}]" |
| 19 | +# echo ::set-output name=matrix::"$scala_versions" |
| 20 | +# outputs: |
| 21 | +# scala_versions: ${{ steps.set-matrix.outputs.matrix }} |
| 22 | +# |
| 23 | +# test-coverage: |
| 24 | +# runs-on: ubuntu-20.04 |
| 25 | +# steps: |
| 26 | +# - uses: actions/checkout@v2 |
| 27 | +# - name: Set up JDK 11 |
| 28 | +# uses: actions/setup-java@v2 |
| 29 | +# with: |
| 30 | +# java-version: '11' |
| 31 | +# distribution: 'adopt' |
| 32 | +# - name: Cache Java modules |
| 33 | +# uses: actions/cache@v2 |
| 34 | +# env: |
| 35 | +# cache-name: cache-java-modules |
| 36 | +# with: |
| 37 | +# path: ~/.m2 |
| 38 | +# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }} |
| 39 | +# restore-keys: | |
| 40 | +# ${{ runner.os }}-build-${{ env.cache-name }}- |
| 41 | +# ${{ runner.os }}-build- |
| 42 | +# ${{ runner.os }}- |
| 43 | +# - name: Cache Scala modules |
| 44 | +# uses: actions/cache@v2 |
| 45 | +# env: |
| 46 | +# cache-name: cache-scala-modules |
| 47 | +# with: |
| 48 | +# path: ~/.m2 |
| 49 | +# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }} |
| 50 | +# restore-keys: | |
| 51 | +# ${{ runner.os }}-build-${{ env.cache-name }}- |
| 52 | +# ${{ runner.os }}-build- |
| 53 | +# ${{ runner.os }}- |
| 54 | +# - name: Cache Sbt modules |
| 55 | +# uses: actions/cache@v2 |
| 56 | +# env: |
| 57 | +# cache-name: cache-sbt-modules |
| 58 | +# with: |
| 59 | +# path: ~/.sbt/1.0 |
| 60 | +# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }} |
| 61 | +# restore-keys: | |
| 62 | +# ${{ runner.os }}-build-${{ env.cache-name }}- |
| 63 | +# ${{ runner.os }}-build- |
| 64 | +# ${{ runner.os }}- |
| 65 | +# - name: Run Sbt Test and Generate Report on Multiple Scala Versions |
| 66 | +# run: | |
| 67 | +# sbt +coverage +test |
| 68 | +# sbt +coverageReport |
| 69 | +# - uses: actions/upload-artifact@v2 |
| 70 | +# with: |
| 71 | +# name: coverage-report |
| 72 | +# path: ./target/scala-[0-9].[0-9][0-9] |
| 73 | +# |
| 74 | +# upload-coverage: |
| 75 | +# runs-on: ubuntu-latest |
| 76 | +# needs: [retrieve-scala-versions, test-coverage] |
| 77 | +# strategy: |
| 78 | +# fail-fast: false |
| 79 | +# matrix: |
| 80 | +# scala_version: ${{ fromJSON(needs.retrieve-scala-versions.outputs.scala_versions) }} |
| 81 | +# steps: |
| 82 | +# - uses: actions/checkout@v2 |
| 83 | +# - uses: actions/download-artifact@v2 |
| 84 | +# with: |
| 85 | +# name: coverage-report |
| 86 | +# path: ./target/ |
| 87 | +# - uses: codecov/codecov-action@v2 |
| 88 | +# with: |
| 89 | +# token: ${{ secrets.CODECOV_TOKEN }} |
| 90 | +# directory: ./target/scala-${{ matrix.scala_version }}/ |
| 91 | +# flags: unittests,${{ matrix.scala_version }}/scoverage-report/scoverage.xml |
| 92 | +# name: codecov-json-logic-scala |
| 93 | +# fail_ci_if_error: true |
| 94 | +# verbose: true |
0 commit comments