Skip to content

Update role when adding user. #108

Update role when adding user.

Update role when adding user. #108

Workflow file for this run

name: api_test
on:
push:
branches: [ main ]
paths:
- 'api/**'
- '.github/workflows/api_deploy.yml'
- '.github/workflows/api_test.yml'
pull_request:
branches: [ main ]
paths:
- 'api/**'
- '.github/workflows/api_deploy.yml'
- '.github/workflows/api_test.yml'
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: 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
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: setup db
run: PGPASSWORD=postgres PGHOST=localhost PGUSER=postgres make -C api db-ci
- name: Test
run: make -C api test
- name: Build
run: make -C api build
- name: Bundle
run : |
echo "${{ secrets.API_ENV_CONFIG }}" > ${{ github.workspace }}/api/build/env
cp -R ${{ github.workspace }}/api/db ${{ github.workspace }}/api/build/
cd ${{ github.workspace }}/api; tar -zcvf server.tgz build
- name: upload server.tgz artifact
uses: actions/upload-artifact@v2
with:
name: server.tgz
path: ${{ github.workspace }}/api/server.tgz