From 47ce508089f60085d83e755dc4bf932a3e353320 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Sat, 4 Nov 2023 02:45:18 -0700 Subject: [PATCH] *: Limit integration testing to one at a time in CI --- .github/workflows/test.yml | 53 +++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02dabe41..eeb67a1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,18 @@ on: pull_request: jobs: - test: + nix-env: + name: Initialize Nix + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install Nix packages + uses: diamondburned/cache-install@main + + generate: + name: Generate + needs: [nix-env] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -22,9 +33,45 @@ jobs: exit 1 fi + build: + name: Build + runs-on: ubuntu-latest + needs: [generate] + steps: + - uses: actions/checkout@v2 + + - name: Install Nix packages + uses: diamondburned/cache-install@main + - name: Build - run: | - go build ./... + run: go build ./... + + - name: Run Unit Tests + run: go test ./... + + unit-test: + name: Unit Test + runs-on: ubuntu-latest + needs: [build] + steps: + - uses: actions/checkout@v2 + + - name: Install Nix packages + uses: diamondburned/cache-install@main + + - name: Test + run: go test ./... + + integration-test: + name: Integration Test + concurrency: integration-test + runs-on: ubuntu-latest + needs: [build] + steps: + - uses: actions/checkout@v2 + + - name: Install Nix packages + uses: diamondburned/cache-install@main - name: Test run: |