From 56be82f70595e1eedee72dc47bb38e3439a57062 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 10:15:09 -0500 Subject: [PATCH 01/14] Use modern Linux in Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ef73bc1..215f1683 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ sudo: required language: scala -dist: trusty +dist: jammy scala: - 2.13.4 jdk: From 628cc0d1961c2828abc2cee0d027fb8640c923b1 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 13:41:30 -0500 Subject: [PATCH 02/14] Try making Github Action --- .github/workflows/unit_tests.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/unit_tests.yml diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 00000000..d605ff01 --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -0,0 +1,34 @@ +name: 'Agora unit tests' + +on: + workflow_dispatch: #Manual trigger from GitHub UI + push: + merge_group: + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 # Checkout the Agora repo + - 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 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - name: Run tests + run: | + sbt clean coverage test coverageReport From b9e08a903df163591b334fef0d32c591399faa59 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 13:47:46 -0500 Subject: [PATCH 03/14] Pre-pull images --- .github/workflows/unit_tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d605ff01..27643185 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -29,6 +29,9 @@ jobs: with: distribution: temurin java-version: 11 + - name: Run tests run: | + docker pull mongo:4.4 + docker pull testcontainersofficial/ryuk:0.3.0 sbt clean coverage test coverageReport From 268be56c220b5cf70bfeb4b8781be1cb5b012a26 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 13:52:49 -0500 Subject: [PATCH 04/14] git secrests --- .github/workflows/unit_tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 27643185..5d275b81 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -34,4 +34,6 @@ jobs: run: | docker pull mongo:4.4 docker pull testcontainersofficial/ryuk:0.3.0 + ./minnie-kenny.sh --force + git secrets --scan-history sbt clean coverage test coverageReport From f7f662638ff85d6fc47e1c981a784f5e25831264 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 13:57:21 -0500 Subject: [PATCH 05/14] Undo distro change --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 215f1683..1ef73bc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ sudo: required language: scala -dist: jammy +dist: trusty scala: - 2.13.4 jdk: From dd28962d3cf2f7ac3f20d906294f002d98ed74ec Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:03:52 -0500 Subject: [PATCH 06/14] `pull_request` --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 5d275b81..eb06e834 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -4,6 +4,7 @@ on: workflow_dispatch: #Manual trigger from GitHub UI push: merge_group: + pull_request: jobs: build-and-test: From 0317f1ea87ca23a29e3514ea6e94dfa8331b00a0 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:06:39 -0500 Subject: [PATCH 07/14] Comment --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index eb06e834..634830e5 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -33,6 +33,7 @@ jobs: - name: Run tests run: | + # Testcontainers does not seem to be able to pull the containers on its own if the image is not present docker pull mongo:4.4 docker pull testcontainersofficial/ryuk:0.3.0 ./minnie-kenny.sh --force From 0b77d653ef2d2ad293840bbc8e75d8856ba34eb2 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:07:04 -0500 Subject: [PATCH 08/14] Comment --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 634830e5..f95c8730 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -31,9 +31,9 @@ jobs: distribution: temurin java-version: 11 + # Testcontainers does not seem to be able to pull the containers on its own if the image is not present - name: Run tests run: | - # Testcontainers does not seem to be able to pull the containers on its own if the image is not present docker pull mongo:4.4 docker pull testcontainersofficial/ryuk:0.3.0 ./minnie-kenny.sh --force From 0b3e590f61f9a043c3eb8595d957237500b0bff1 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:11:23 -0500 Subject: [PATCH 09/14] Delete Travis --- .dockerignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 5c54e76d..e494a070 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,5 +4,4 @@ .idea README.md target -.travis.yml *-service-account.json From bacb9cb8559c87c65919fce693204b7efc4ab61a Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:12:09 -0500 Subject: [PATCH 10/14] Delete Travis for real --- .travis.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1ef73bc1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -sudo: required -language: scala -dist: trusty -scala: - - 2.13.4 -jdk: - - openjdk11 -script: - - >- - ./minnie-kenny.sh --force && - git secrets --scan-history && - sbt clean coverage test coverageReport -after_success: bash <(curl -s https://codecov.io/bash) -before_install: - - >- - git clone https://github.com/awslabs/git-secrets.git git-secrets && - pushd git-secrets > /dev/null && - git checkout ad82d68ee924906a0401dfd48de5057731a9bc84 && - export PATH="${PATH}:${PWD}" && - popd > /dev/null From 570599a6a3542f5b6a0ddb0eb7124ed891fa02bc Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:34:57 -0500 Subject: [PATCH 11/14] Docker build --- .github/workflows/docker_build.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/docker_build.yml diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml new file mode 100644 index 00000000..ba90137e --- /dev/null +++ b/.github/workflows/docker_build.yml @@ -0,0 +1,37 @@ +name: 'Agora Docker build (no push)' + +on: + workflow_dispatch: + push: + merge_group: + pull_request: + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - 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 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + + # Testcontainers does not seem to be able to pull the containers on its own if the image is not present + - name: Run tests + run: | + docker build -t agora . From 9cb05ba613c34f1bc41e9b16e58be210b36dfe4e Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:37:13 -0500 Subject: [PATCH 12/14] Don't need push --- .github/workflows/docker_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index ba90137e..c624b3e2 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -2,7 +2,6 @@ name: 'Agora Docker build (no push)' on: workflow_dispatch: - push: merge_group: pull_request: From cb487503ab4df084a8a920ce5e809ddcab3b18ec Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:40:46 -0500 Subject: [PATCH 13/14] Fix copypasta --- .github/workflows/docker_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index c624b3e2..2b2332b3 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -30,7 +30,6 @@ jobs: distribution: temurin java-version: 11 - # Testcontainers does not seem to be able to pull the containers on its own if the image is not present - - name: Run tests + - name: Build image run: | docker build -t agora . From 0f976c528fc83f1ffecbd36df7788134ffbd3b84 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Thu, 21 Dec 2023 14:44:00 -0500 Subject: [PATCH 14/14] Latest version --- .github/workflows/docker_build.yml | 2 +- .github/workflows/unit_tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 2b2332b3..6d3e7445 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -25,7 +25,7 @@ jobs: git secrets --scan-history shell: bash - name: Setup JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index f95c8730..4b9ae8f1 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -26,7 +26,7 @@ jobs: git secrets --scan-history shell: bash - name: Setup JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11