38 document how to run e2e tests locally (#39) #24
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: Test | |
on: [push, pull_request] | |
jobs: | |
e2e-tests: | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
env: | |
POSTGRES_USER: "root" | |
POSTGRES_PASSWORD: "supercoolpassword" | |
POSTGRES_DB: "data" | |
POSTGRES_TABLE: "couchdb" | |
POSTGRES_SCHEMA: "v1" | |
DBT_POSTGRES_USER: "dbt_user" | |
DBT_POSTGRES_PASSWORD: "supercoolpassword" | |
DBT_POSTGRES_SCHEMA: "dbt" | |
DBT_POSTGRES_HOST: "postgres" | |
CHT_PIPELINE_BRANCH_URL: "https://github.com/medic/cht-pipeline.git#main" | |
COUCHDB_USER: "test" | |
COUCHDB_PASSWORD: "test" | |
COUCHDB_DBS: "couchdb couchdb_sentinel" | |
COUCHDB_HOST: "couchdb" | |
COUCHDB_PORT: 5984 | |
COUCHDB_SECURE: false | |
SUPERSET_PASSWORD: "password" | |
SUPERSET_ADMIN_EMAIL: "[email protected]" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Get Docker Hub username | |
id: get-docker-hub-username | |
run: echo '::set-output name=dockerhub_username::${{ secrets.DOCKERHUB_USERNAME }}' | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
if: steps.get-docker-hub-username.outputs.dockerhub_username | |
- name: Install | |
run: npm install | |
- name: Run local | |
run: npm run local | |
- name: Sleep for 60 seconds | |
run: sleep 60s | |
- name: Run e2e tests | |
run: npm test |