Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

readme: archival notice (#188) #411

readme: archival notice (#188)

readme: archival notice (#188) #411

name: Continuous Integration Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://ei@localhost:5432/ei_test?sslmode=disable
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust
# 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: Set up Postgres user
uses: docker://postgres
with:
args: psql -v ON_ERROR_STOP=1 --username postgres -h postgres -c "CREATE USER ei NOSUPERUSER CREATEDB;"
- name: Checkout the repo
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Fetch EI dependencies
run: go mod download
- name: Test EI
run: go test -v ./...
- name: Fetch Mock client dependencies
run: cd ./integration/mock-client && go mod download
- name: Test Mock client
run: cd ./integration/mock-client && go test -v ./...
integration:
name: Integration tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Run the setup
run: ./integration/setup
- name: Run the tests
run: ./integration/run_test