-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WX-906 Sbt Unit Tests as Github Actions #6992
Merged
Merged
Changes from 136 commits
Commits
Show all changes
137 commits
Select commit
Hold shift + click to select a range
89fb748
workflow trial 1
a7f5fe7
udate
THWiseman c619a61
remove trigger
THWiseman 900da1b
add workflow_dispatch
THWiseman 41b4fc5
fix spelling mistake
THWiseman b742a6b
echo environment variables
THWiseman 2c8fe94
typo
THWiseman ef5540f
change enviornment variable scope
THWiseman 3960e6a
it was working the first time
THWiseman 047b957
here goes nothing
THWiseman f8f73c7
getting my bearings
THWiseman 85e949e
dotslash
THWiseman a028550
are you suuuuure git?
THWiseman 9207552
checkout first
THWiseman 49c45bf
formatting
THWiseman 2daf2d6
try this
THWiseman 6fc8470
steal from adam
THWiseman 776e4a9
with scala
THWiseman 426044a
full steal
THWiseman 6b30ef4
v3 newer than v2
THWiseman 61704c8
moment of truth
THWiseman 4c70191
will this work?
THWiseman da89730
this is the secret sauce
THWiseman 6c623ed
This should still be working
THWiseman e6cd875
one more test
THWiseman 23b5f53
try again
THWiseman 079b3c6
spelling
THWiseman b435c7a
rename file
THWiseman d1e7629
comments
THWiseman 2da9d83
optimize command
THWiseman 9d12de0
test with matrix
THWiseman 076ed6a
try something else
THWiseman 75c0955
tab
THWiseman efbc02c
more realistic workflow
THWiseman 8bb541c
why fail fast if you can prolong your failure
THWiseman 3476796
continue on error
THWiseman 6b8afdb
syntax
THWiseman e9018d8
updated yaml
THWiseman f6cce2f
git secrets attempt
THWiseman b727570
bigger test suite
THWiseman a399d12
path stuff
THWiseman c36fd91
yolo
THWiseman 0349d6d
name cache setup
THWiseman d84cbab
hyphens
THWiseman aee9df5
steps
THWiseman aaeee6f
do we even need that?
THWiseman adcfae8
yes we need that
THWiseman eda3f89
please don't break the internet
THWiseman 81ce1da
syntax error this
THWiseman a985a64
desparate
THWiseman d4da61f
no more
THWiseman 3132a19
case sensitive and so am I
THWiseman ae82349
commentos
THWiseman 3a158ea
rename and polish
THWiseman 4e0821c
this will not work
THWiseman a1b4f4b
newlines
THWiseman 8076020
yaml
THWiseman d00fe60
error lol
THWiseman 9272636
pipe
THWiseman 2ccbc76
one step closer
THWiseman 602c5ee
idk
THWiseman 53df19c
syntax why
THWiseman cd78e00
yeye
THWiseman 9a93df0
back to basics
THWiseman b691681
advanced techniques
THWiseman 897bb7a
this wont work either
THWiseman 025eea8
nope
THWiseman 89a5607
try again
THWiseman f155b49
aisd
THWiseman f28381e
pipe got lost
THWiseman e978ad4
quotatsions
THWiseman e4f6f82
trying
THWiseman 8d702de
\s
THWiseman 778af44
rome was built from the command line
THWiseman 7eff689
i cant keep coming up with commit messages
THWiseman a62a754
working?
THWiseman 11101fb
Escape asterisks
jgainerdewar c4341da
Does this work?
jgainerdewar 39e6270
Also escape dollar sign
jgainerdewar ceed50e
Testing
jgainerdewar df46ef6
More escaping
jgainerdewar de6704b
Less escaping
jgainerdewar 9afc8c9
Testing
jgainerdewar c9640c6
EVEN MORE ESCAPING
jgainerdewar 29cc772
What if we didn't use brackets at all
jgainerdewar fc01ca7
Testing
jgainerdewar 76290cd
Testing
jgainerdewar c924572
Testing
jgainerdewar 997f5a7
Testing
jgainerdewar 3cfee4a
Testing
jgainerdewar 0470963
Testing
jgainerdewar 5d11931
Testing
jgainerdewar e83e7a4
Testing
jgainerdewar 678f77a
Testing
jgainerdewar cc209c4
Testing
jgainerdewar 069c1a6
Testing
jgainerdewar 8368318
Testing
jgainerdewar 9c8b38c
Remove color codes
jgainerdewar db128af
Try the whole thing
jgainerdewar 461c0aa
Oops
jgainerdewar 6358c75
Revert test changes, remove trailing comma
jgainerdewar 52ee24f
Leave comma to deal with later, add comment
jgainerdewar 15d9302
here goes nothing
THWiseman bf91a06
whitespace
THWiseman 74796d4
using secrets
THWiseman 247f412
comments
THWiseman d184b6f
yolo
THWiseman 68fc894
indent
THWiseman 962c04f
idgetit
THWiseman 0302bc6
indent
THWiseman afe4d3b
this is dumb
THWiseman 01fbece
copypasta
THWiseman 37bca13
asd
THWiseman 019f333
actionable
THWiseman 5aa1271
whitespace
THWiseman e9dc5f6
remove newline:
THWiseman 857ad95
lets seeeeee
THWiseman 97b3666
what is even in there:
THWiseman 7fb8069
the ol doubble commar
THWiseman a78c30f
the double dot
THWiseman f4d7216
dont ask questions
THWiseman 54aaee3
y
THWiseman 8403b9f
2
THWiseman fcf9c8f
5
THWiseman eaa4852
lol
THWiseman 2609146
whitespoace
THWiseman f4837f8
a
THWiseman 33fe63c
whoops
THWiseman df0fbc7
better formatting
THWiseman 05ff151
commento
THWiseman 4e338c4
eof
THWiseman 58e8f80
length
THWiseman 13b0062
speedtest without cache
THWiseman d9da2ed
cacheless speedtest
THWiseman e00aad3
kids call these things hashtags
THWiseman 83b8daf
address PR feedback with liberal use of the delete key
THWiseman 4bc0bc8
fix up some comment
THWiseman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#This is a series of steps that will setup Java/sbt/Cromwell on the local runner. | ||
#These steps are meant to be re-used and invoked by other Github Action Workflows | ||
name: 'Set Up Cromwell Steps' | ||
description: Specific steps that will set up git secrets, java, sbt, and Cromwell on the local machine. | ||
inputs: | ||
cromwell_repo_token: #As an input to this action, you are required to pass in a token that can be used to authenticate while checking out Cromwell. | ||
required: true | ||
|
||
runs: | ||
using: "composite" # <-- this allows these steps to be used by other workflows. | ||
steps: | ||
#Allows this github action to use a cache to store stuff like Java and sbt files between runs. | ||
- uses: actions/checkout@v3 | ||
name: Checkout Coursier Cache | ||
- uses: coursier/cache-action@v6 | ||
name: Enable Coursier Cache | ||
|
||
#Cromwell requires git-secrets be setup. Here, we set up secrets and verify success with a script. | ||
- name: Git secrets setup | ||
run: | | ||
git clone https://github.com/awslabs/git-secrets.git ~/git-secrets | ||
cd ~/git-secrets | ||
git checkout ad82d68ee924906a0401dfd48de5057731a9bc84 | ||
sudo make install | ||
shell: bash | ||
|
||
- name: Secrets check | ||
run: | | ||
sudo ln -s "$(which echo)" /usr/local/bin/say | ||
./minnie-kenny.sh --force | ||
git secrets --scan-history | ||
shell: bash | ||
|
||
#Clone the cromwell repo to this VM. | ||
- name: Clone Cromwell | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: broadinstitute/cromwell | ||
token: ${{ inputs.cromwell_repo_token }} | ||
|
||
#Install Java to this VM. This Java version and distribution is compatible with Cromwell. | ||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'Cromwell unit tests' | ||
|
||
#This github action runs all of Cromwell's unit tests. | ||
#A matrix strategy is used so that each subproject can be unit tested in parallel with all other subprojects. | ||
|
||
#This is what shows up in the github workflows page as the title. | ||
run-name: ${{ github.actor }} running Cromwell sbt unit tests. | ||
|
||
#What will trigger the workflow to run. | ||
on: | ||
workflow_dispatch: #Manual trigger from GitHub UI | ||
push: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-and-test: | ||
#This action is using a Github free runner, rather than a Broad self-hosted one. | ||
#This is because the Broad ones don't have sbt installed by default. | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 # checkout the cromwell repo | ||
- uses: ./.github/set_up_cromwell_action #Exectute this reusable github action. It will set up java/sbt/git-secrets/cromwell. | ||
with: | ||
cromwell_repo_token: ${{ secrets.BROADBOT_GITHUB_TOKEN }} | ||
|
||
#Invoke SBT on a specific subproject, asking it to run all unit tests contained within that subproject. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably want to update this comment 🙂 |
||
- name: Run tests | ||
run: | | ||
set -e | ||
sbt "test" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably fine for these small tests, that are unlikely to ever be the longest-running piece and therefore gating factor to speed.