From 6b415b3d7d5b0daf44fb43d19fea76566c3eafb4 Mon Sep 17 00:00:00 2001 From: Erasmus Cedernaes Date: Sat, 30 Dec 2023 15:09:56 +0100 Subject: [PATCH 1/4] Make sure to initialize dotenv before building --- .github/workflows/makeradmin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/makeradmin.yml b/.github/workflows/makeradmin.yml index 532f4a1dd..803be0939 100644 --- a/.github/workflows/makeradmin.yml +++ b/.github/workflows/makeradmin.yml @@ -21,6 +21,8 @@ jobs: docker --version docker-compose --version - uses: actions/checkout@v2 + - name: Init environment + run: make .env - name: Build docker run: make build - name: Run tests From ec7be0b1c3c64fa7647ab810053d313b443819b0 Mon Sep 17 00:00:00 2001 From: Erasmus Cedernaes Date: Sat, 30 Dec 2023 15:41:31 +0100 Subject: [PATCH 2/4] Pass secrets to Github actions --- .github/workflows/makeradmin.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/makeradmin.yml b/.github/workflows/makeradmin.yml index 803be0939..3fa70dec7 100644 --- a/.github/workflows/makeradmin.yml +++ b/.github/workflows/makeradmin.yml @@ -27,3 +27,6 @@ jobs: run: make build - name: Run tests run: make test +env: + STRIPE_PRIVATE_KEY: ${{ secrets.STRIPE_PRIVATE_KEY }} + STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }} From 3cda57be1db470954133c201755b65dc7c7905ce Mon Sep 17 00:00:00 2001 From: Erasmus Cedernaes Date: Sat, 13 Apr 2024 20:32:06 +0200 Subject: [PATCH 3/4] Run all tests in a separate job --- .github/workflows/makeradmin.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/makeradmin.yml b/.github/workflows/makeradmin.yml index ffa447784..589e534dd 100644 --- a/.github/workflows/makeradmin.yml +++ b/.github/workflows/makeradmin.yml @@ -6,7 +6,7 @@ on: - "**" jobs: - test: + unit-test: runs-on: ubuntu-latest steps: - name: Install prerequisites @@ -24,6 +24,25 @@ jobs: run: make build - name: Run tests run: make test -env: - STRIPE_PRIVATE_KEY: ${{ secrets.STRIPE_PRIVATE_KEY }} - STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }} + + stripe-tests: + runs-on: ubuntu-latest + steps: + - name: Install prerequisites + run: | + sudo apt install -y python3-pip + pip3 install docker-compose + - name: List versions + run: | + docker --version + docker-compose --version + - uses: actions/checkout@v2 + - name: Init environment + run: make .env + - name: Build docker + run: make build + - name: Run tests + run: make test + env: + STRIPE_PRIVATE_KEY: ${{ secrets.STRIPE_PRIVATE_KEY }} + STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }} From c115cd5623e5dda0bba81dc78f28c95267818f64 Mon Sep 17 00:00:00 2001 From: Erasmus Cedernaes Date: Sat, 13 Apr 2024 20:33:04 +0200 Subject: [PATCH 4/4] Only allow stripe tests to be run one at a time --- .github/workflows/makeradmin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/makeradmin.yml b/.github/workflows/makeradmin.yml index 589e534dd..d2dec2baf 100644 --- a/.github/workflows/makeradmin.yml +++ b/.github/workflows/makeradmin.yml @@ -27,6 +27,7 @@ jobs: stripe-tests: runs-on: ubuntu-latest + concurrency: stripe steps: - name: Install prerequisites run: |