-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (30 loc) · 1.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Test
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Add hosts
run: echo "127.0.0.1 pmg.test" | sudo tee -a /etc/hosts
- name: Run tests
run: docker-compose -f docker-compose.yml -f docker-compose-test.yml run --rm web nosetests --with-coverage tests
- name: Setup Dev Database
run: docker-compose run --rm web python setup_dev_database.py
- name: Setup the database Stamp Head
run: docker-compose run --rm web python app.py db stamp head
- name: Setup the database Search Reindex All
run: docker-compose run --rm web python bin/search.py --reindex all
- name: Start the server
run: docker-compose up -d
- name: Wait for app
run: bin/wait-for-app.sh
- name: "Smoke test demo data check that a typical request returns the data in demodata"
run: curl -f http://pmg.test:5000 | grep "Featured Content"
# Run codecov passing appropriate codecov.io CI environment variables to container
- name: codecov
run: docker-compose run --rm `bash <(curl -s https://codecov.io/env)` web codecov