added stuff to README, revoked access to new batch of users #201
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: Golang CI | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
check-latest: true | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test ./... -cover -v -timeout 10s -short | |
postgres-tests: | |
needs: build | |
# Containers must run in Linux based operating systems | |
runs-on: ubuntu-latest | |
# Docker Hub image that `container-job` executes in | |
container: golang:1.20.1-alpine3.17 | |
# Service containers to run with `container-job` | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Install psql | |
run: | | |
apk update | |
apk add postgresql | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Create test database | |
run: | | |
psql -U postgres -h postgres -f ./testdata/db.sql | |
env: | |
POSTGRES_HOST: postgres | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
PGPASSWORD: postgres | |
- name: Populate test database | |
run: | | |
psql -U postgres -d testdb -h postgres -f ./testdata/data.sql | |
env: | |
POSTGRES_HOST: postgres | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
PGPASSWORD: postgres | |
- name: Run tests | |
run: go test ./... -run Postgres -v -timeout 120s | |
env: | |
POSTGRES_HOST: postgres | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres |