-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
3 deletions.
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,96 @@ | ||
name: Scala tests with coverage | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: ['**.md'] | ||
push: | ||
paths-ignore: ['**.md'] | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
SBT_OPTS: >- | ||
-Xmx3g | ||
-Denv.type=test | ||
-Ddirectory.url=ldap://localhost:3389 -Ddirectory.password=testtesttest | ||
-Dpostgres.host=localhost -Dpostgres.port=5432 | ||
services: | ||
postgres: | ||
image: postgres:9.6 | ||
env: | ||
POSTGRES_USER: sam-test | ||
POSTGRES_PASSWORD: sam-test | ||
POSTGRES_DB: testdb | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
# openDJ: | ||
# image: broadinstitute/openam:opendj | ||
# env: | ||
# ROOTPASS: testtesttest | ||
# BASE_DN: dc=dsde-dev,dc=broadinstitute,dc=org | ||
# options: >- | ||
# --health-cmd status | ||
# --health-interval 10s | ||
# --health-timeout 5s | ||
# --health-retries 5 | ||
## -v ${{ github.workspace }}/docker/opendjsetup.sh:/opt/opendj/bootstrap/setup.sh | ||
## -v ${{ github.workspace }}/docker/example-v1.json:/opt/example-v1.json | ||
# ports: | ||
# - 3389:389 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# coursier cache action caches both coursier and sbt caches | ||
- name: coursier-cache-action | ||
uses: coursier/cache-action@v5 | ||
|
||
- name: Set up opendj | ||
run: | | ||
sh docker/run-opendj.sh start | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- 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 | ||
- name: Secrets check | ||
run: | | ||
./minnie-kenny.sh --force | ||
git secrets --scan-history | ||
# | ||
# - name: Integration tests | ||
# id: tests | ||
# run: sbt clean "testOnly -- -n org.broadinstitute.tags.SchemaInit" | ||
|
||
# - name: Generate coverage report | ||
# id: coverageReport | ||
# run: sbt coverage "testOnly -- -l org.broadinstitute.tags.SchemaInit" coverageReport | ||
|
||
- name: Generate java client | ||
id: javaClient | ||
run: | | ||
bash scripts/gen_java_client.sh | ||
export SBT_OPTS="-Xmx3g" | ||
bash scripts/publish-client.sh | ||
- name: Shut down opendj | ||
run: | | ||
sh docker/run-opendj.sh stop |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
set -e | ||
|
||
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v4.0.3 generate -i /local/src/main/resources/swagger/api-docs.yaml -g java -o /local/codegen_java --api-package org.broadinstitute.dsde.workbench.client.sam.api --model-package org.broadinstitute.dsde.workbench.client.sam.model | ||
|
||
echo ranDockerCommand | ||
cd codegen_java | ||
|
||
sbt test | ||
echo attemptingTesting | ||
sbt test | ||
echo finishedTesting |