|
1 | 1 | name: CI |
2 | 2 | on: |
3 | 3 | push: |
4 | | - branches: [main] |
| 4 | + branches: |
| 5 | + - main |
| 6 | + paths: |
| 7 | + - '**.scala' |
| 8 | + - '**.java' |
| 9 | + - '**.sbt' |
| 10 | + - '.scalafmt.conf' |
| 11 | + - '.github/workflows/ci.yml' |
5 | 12 | pull_request: |
6 | | - branches: [main] |
| 13 | + branches: |
| 14 | + - main |
| 15 | + paths: |
| 16 | + - '**.scala' |
| 17 | + - '**.java' |
| 18 | + - '**.sbt' |
| 19 | + - '.scalafmt.conf' |
| 20 | + - '.github/workflows/ci.yml' |
7 | 21 | schedule: |
8 | | - - cron: '0 0 * * *' |
| 22 | + - cron: '0 * * * *' |
9 | 23 | jobs: |
10 | | - build: |
11 | | - strategy: |
12 | | - fail-fast: false |
13 | | - matrix: |
14 | | - os: [ ubuntu-latest ] |
15 | | - jdk: [ adopt@1.8, adopt@1.11, adopt@1.14 ] |
16 | | - scala: [ 2.12.13, 2.13.5 ] |
17 | | - runs-on: ${{ matrix.os }} |
| 24 | + lint: |
| 25 | + runs-on: ubuntu-latest |
18 | 26 | env: |
19 | 27 | JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
20 | 28 | JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
21 | | - AWS_REGION: ap-northeast-1 |
22 | | - TEST_TIME_FACTOR: 5 |
23 | 29 | steps: |
24 | | - - uses: actions/checkout@v2.3.4 |
25 | | - with: |
26 | | - fetch-depth: 0 |
27 | | - - uses: olafurpg/setup-scala@v10 |
28 | | - with: |
29 | | - java-version: ${{ matrix.jdk }} |
30 | | - - uses: coursier/cache-action@v5 |
31 | | - - run: sbt -v ++${{ matrix.scala }} compile |
32 | | - - name: clean up |
33 | | - run: "${GITHUB_WORKSPACE}/.github/clean-up.sh" |
| 30 | + - uses: actions/checkout@v2.3.4 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + - uses: olafurpg/setup-scala@v10 |
| 34 | + with: |
| 35 | + java-version: "adopt@1.8" |
| 36 | + - uses: coursier/cache-action@v5 |
| 37 | + - run: sbt -v lint |
| 38 | + - name: clean up |
| 39 | + run: "${GITHUB_WORKSPACE}/.github/clean-up.sh" |
34 | 40 | test: |
35 | 41 | strategy: |
36 | 42 | fail-fast: false |
37 | 43 | matrix: |
38 | | - os: [ ubuntu-latest ] |
39 | 44 | jdk: [ adopt@1.8, adopt@1.11, adopt@1.14 ] |
40 | | - scala: [ 2.12.13, 2.13.5 ] |
41 | | - runs-on: ${{ matrix.os }} |
42 | | - needs: build |
| 45 | + scala: [ 2.13.5, 2.12.13 ] |
| 46 | + runs-on: ubuntu-latest |
| 47 | + needs: lint |
43 | 48 | env: |
44 | 49 | JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
45 | 50 | JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
46 | 51 | AWS_REGION: ap-northeast-1 |
47 | | - TEST_TIME_FACTOR: 5 |
| 52 | + TEST_TIME_FACTOR: 3 |
48 | 53 | steps: |
49 | 54 | - uses: actions/checkout@v2.3.4 |
50 | 55 | with: |
51 | 56 | fetch-depth: 0 |
52 | 57 | - uses: olafurpg/setup-scala@v10 |
53 | 58 | with: |
54 | 59 | java-version: ${{ matrix.jdk }} |
55 | | - - uses: coursier/cache-action@v5 |
| 60 | + - uses: coursier/cache-action@v6 |
56 | 61 | - uses: olafurpg/setup-gpg@v3 |
57 | | - - run: sbt -v ++${{ matrix.scala }} test |
| 62 | + - name: sbt test |
| 63 | + run: sbt -v ++${{ matrix.scala }} test |
58 | 64 | - name: clean up |
59 | 65 | run: "${GITHUB_WORKSPACE}/.github/clean-up.sh" |
| 66 | + automerge: |
| 67 | + runs-on: ubuntu-latest |
| 68 | + if: github.event_name == 'pull_request' |
| 69 | + needs: test |
| 70 | + steps: |
| 71 | + - name: Generate token |
| 72 | + id: generate_token |
| 73 | + uses: tibdex/github-app-token@v1 |
| 74 | + with: |
| 75 | + app_id: 111016 |
| 76 | + private_key: ${{ secrets.MY_SCALA_STEWARD }} |
| 77 | + - name: labeler |
| 78 | + uses: actions/labeler@v3 |
| 79 | + with: |
| 80 | + repo-token: "${{ steps.generate_token.outputs.token }}" |
| 81 | + - name: automerge |
| 82 | + uses: pascalgn/automerge-action@v0.13.1 |
| 83 | + env: |
| 84 | + GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}" |
| 85 | + MERGE_LABELS: "automerge" |
| 86 | + MERGE_METHOD: "rebase" |
| 87 | + MERGE_FILTER_AUTHOR: "my-scala-steward[bot]" |
0 commit comments