Last active
February 1, 2020 22:57
-
-
Save seandearnaley/031a3c649c81557a158ab46c17f814df to your computer and use it in GitHub Desktop.
GitHub Action Node Server Test CI
This file contains hidden or 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: Node Server Test CI | |
on: | |
push: | |
paths: | |
- 'server/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10.x, 12.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build the Postgres stack | |
working-directory: server | |
run: docker-compose up -d | |
env: | |
POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
PGADMIN_DEFAULT_EMAIL: ${{ secrets.PGADMIN_DEFAULT_EMAIL }} | |
PGADMIN_DEFAULT_PASSWORD: ${{ secrets.PGADMIN_DEFAULT_PASSWORD }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: yarn install, build, and test | |
working-directory: server | |
run: | | |
yarn install --frozen-lockfile | |
yarn test --verbose | |
env: | |
CI: true | |
POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
PGADMIN_DEFAULT_EMAIL: ${{ secrets.PGADMIN_DEFAULT_EMAIL }} | |
PGADMIN_DEFAULT_PASSWORD: ${{ secrets.PGADMIN_DEFAULT_PASSWORD }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment