-
Notifications
You must be signed in to change notification settings - Fork 11
86 lines (68 loc) · 2.33 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
scala:
- 2.13.14
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- name: setup Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'oracle'
cache: 'sbt'
- name: setup SBT
uses: sbt/setup-sbt@v1
- name: Check formatting
run: sbt scalafmtCheckAll
- name: Run tests ${{ matrix.scala }}
if: success()
run: sbt ++${{ matrix.scala }} clean coverage test docs/mdoc versionPolicyCheck
- name: Report test coverage
if: success() && github.repository == 'evolution-gaming/kafka-flow'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: sbt ++${{ matrix.scala }} coverageReport coverageAggregate coveralls
- name: Publish documentation / Setup Node
if: success()
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Publish documentation / Get yarn cache
if: success()
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Publish documentation / Cache dependencies
if: success()
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-website-
- name: Publish documentation / Install dependencies
if: success()
working-directory: ./website
run: yarn install --frozen-lockfile
- name: Publish documentation / Build site
if: success()
working-directory: ./website
run: yarn build
- name: Publish documentation / Deploy
if: success() && github.ref == 'refs/heads/master' && github.repository == 'evolution-gaming/kafka-flow'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build/kafka-flow
- name: Slack Notification
uses: homoluctus/slatify@master
if: failure() && github.ref == 'refs/heads/master' && github.repository == 'evolution-gaming/kafka-flow'
with:
type: ${{ job.status }}
job_name: Build
url: ${{ secrets.SLACK_WEBHOOK }}