Merge pull request #18 from dofusdude/dependabot/go_modules/github.co… #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: integration | |
on: push | |
jobs: | |
container-job: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_PASSWORD: webhooks | |
POSTGRES_DB: webhooks | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Build | |
run: go build -v -race . | |
- name: Setup tests | |
env: | |
POSTGRES_URL: postgres://postgres:webhooks@localhost:5432/webhooks?sslmode=disable | |
run: | | |
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-amd64.tar.gz | tar xvz | |
./migrate -path migrations -database ${POSTGRES_URL} --verbose up | |
- name: Test | |
env: | |
SERVERLESS_SENDER_URL: https://serverless.demo | |
TWITTER_TOKEN: undefined | |
POSTGRES_URL: postgres://postgres:webhooks@localhost:5432/webhooks?sslmode=disable | |
run: | | |
go test -v -race -coverprofile=coverage.txt -covermode=atomic . | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 |