diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml new file mode 100644 index 0000000..37a4e3b --- /dev/null +++ b/.github/workflows/go-test.yaml @@ -0,0 +1,37 @@ +name: Go Test Workflow + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + name: Run Go Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.20 + + - name: Check dependencies + run: go mod tidy + + - name: Run tests + env: + SUPABASE_URI: ${{ secrets.SUPABASE_URI }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + ENV: ${{ secrets.ENV }} + CLIENT_URL: ${{ secrets.CLIENT_URL }} + EMAIL: ${{ secrets.EMAIL }} + EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }} + TEST_EMAIL: ${{ secrets.TEST_EMAIL }} + run: go test ./... -v