enable cross origin resource sharing #4
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: Code Coverage | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
code-cov: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout and clone repo | |
uses: actions/checkout@v4.1.1 | |
- name: Install dependencies | |
run: npm install | |
- name: Setup PostgreSQL | |
uses: Harmon758/postgresql-action@v1.0.0 | |
with: | |
postgresql db: nc_news_test | |
postgresql user: test_user | |
postgresql password: password | |
- name: Run complete test suite | |
run: PGDATABASE=nc_news_test PGUSER=test_user PGPASSWORD=password npm run test-with-cov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |