chore(tests): use the same testing method for local and CI #185
Workflow file for this run
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: | |
workflow_call: | |
pull_request: | |
branches: [main] | |
paths: | |
- '**' | |
- '!docs/**' | |
- '!examples/**' | |
- '!*.md' | |
env: | |
POSTGRES_PASSWORD: postgrespassword | |
HASURA_GRAPHQL_ADMIN_SECRET: test_secret_key | |
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256", "key":"never_use_this_secret_key_in_production_this_is_only_for_CI_testing_098hu32r4389ufb4n38994321","issuer":"hasura-auth"}' | |
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@localhost:5432/postgres | |
HASURA_GRAPHQL_GRAPHQL_URL: http://localhost:8080/v1/graphql | |
jobs: | |
test: | |
name: Service tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node and dependencies | |
uses: ./.github/actions/install-dependencies | |
- name: Run tests | |
shell: bash | |
run: make test | |
- name: Upload test results | |
uses: actions/upload-artifact@v1 | |
with: | |
name: coverage | |
path: coverage |