You've already forked testing-go-code-with-postgres
mirror of
https://github.com/xorcare/testing-go-code-with-postgres.git
synced 2025-07-03 23:30:31 +02:00
Add GitHub actions workflow
This is necessary for the completeness of the example.
This commit is contained in:
35
.github/workflows/go.yml
vendored
Normal file
35
.github/workflows/go.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Go
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.20'
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: Check that all packages are compiling
|
||||||
|
run: make build
|
||||||
|
|
||||||
|
- name: Check that all integration tests are labeled
|
||||||
|
run: make test-short
|
||||||
|
|
||||||
|
- name: Setup test environment
|
||||||
|
run: make test-env-up
|
||||||
|
|
||||||
|
- name: Run all test
|
||||||
|
run: make test
|
||||||
|
|
||||||
|
- name: Teardown test environment
|
||||||
|
run: make test-env-up
|
Reference in New Issue
Block a user