From 4e817b8687523e059913201f1c4e2083d9d346a2 Mon Sep 17 00:00:00 2001 From: J$ Date: Tue, 11 Jun 2024 15:22:49 -0500 Subject: [PATCH] Add unit tests action --- .github/workflows/tests.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..35d5803 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,36 @@ +# Run golang tests on branch main + +name: Unit Tests + +on: + push: + branches: + - main + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.22.3 + - + name: Run Full Test Suite + run: | + go run test/e2e/main.go -memprofile profiles/ -interval 1m + env: + CGO_ENABLED: 0 + - name: Archive the profiles + uses: actions/upload-artifact@v4 + with: + name: mem-profiles + path: profiles/memprofile-*.pprof + retention-days: 5 \ No newline at end of file