Add a description of the toolkit to the README #257
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |