From f015d02627c78d71621ee45f920598b9147db5c5 Mon Sep 17 00:00:00 2001 From: bruce-mig Date: Wed, 6 Dec 2023 16:30:11 +0200 Subject: [PATCH] added workflow --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1ed5380 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: ci-test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + test: + runs-on: ubuntu-latest + + services: + postgres: + image: trufflesuite/ganache-cli:latest + ports: + - 8545:8545 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + + steps: + - name: Set up Go 1.20.x + uses: actions/setup-go@v4 + with: + go-version: '1.20.x' + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Start ganache-cli deterministically + run: ganache-cli -d + + - name: Start server + run: make run + + - name: Test + run: make test \ No newline at end of file