Skip to content

setup test action

setup test action #2

Workflow file for this run

name: Unit Test
on:
push:
branches:
- test-action
pull_request:
branches:
- master
jobs:
test-gws:
runs-on: ubuntu-latest
container: gplates/gws
services:
postgis:
image: gplates/postgis
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
-
name: Check out repository code
uses: actions/checkout@v4
-
name: Run GWS
run: |
cp django/GWS/env.template django/GWS/.env
docker run -d --name gws -p 18000:80 -v `pwd`:/gws gplates/gws
-
name: Sleep for 10 seconds
run: sleep 10s
shell: bash
-
name: Run testcases
run: |
cd test/testcases
export GWS_SERVER_URL=http://gws:18000
python3 -m unittest -vv