-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (66 loc) · 2.05 KB
/
unittests.yaml
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
name: unit tests and docs
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Scala
uses: olafurpg/setup-scala@v12
with:
java-version: [email protected]
- name: Unit Tests
run: |
set -e
./mill _.test
docs:
name: update tool and metric markdown docs
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# To work with the `pull_request` or any other non-`push` even with git-auto-commit
ref: ${{ github.head_ref }}
- name: Setup sdkman
shell: bash -l {0}
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version
echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> "$HOME/.bash_profile"
- name: Install tools
shell: bash -l {0}
run: |
sdk install java 8.312.07.1-amzn
sdk install scala 2.13.0
- name: Build assembly JAR
shell: bash -l {0}
run: |
set -e
./mill _.deployLocal
- name: Build tool docs
shell: bash -l {0}
run: |
set -e
bash src/scripts/build_tool_docs.sh
- name: Build metric docs
shell: bash -l {0}
run: |
set -e
bash src/scripts/build_metric_docs.sh
- name: Commit generated docs
shell: bash -l {0}
run: |
git add docs/tools/*md
git add docs/*md
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
git commit --all --message "Generate docs files" --author "Nobody <[email protected]>" || echo "nothing to commit"
git push --set-upstream origin "HEAD:${{ github.head_ref }}" --follow-tags --atomic