Skip to content
Snippets Groups Projects
Commit 2619d2ad authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: backend test

parent 685adc07
No related branches found
No related tags found
No related merge requests found
...@@ -3,12 +3,10 @@ name: Backend tests ...@@ -3,12 +3,10 @@ name: Backend tests
on: [push] on: [push]
env: env:
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} NODE_ENV: test
HBP_CLIENTID: ${{ secrets.HBP_CLIENTID }}
HBP_CLIENTSECRET: ${{ secrets.HBP_CLIENTSECRET }}
jobs: jobs:
build: install_dep:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
...@@ -17,14 +15,27 @@ jobs: ...@@ -17,14 +15,27 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: cd into deploy, npm install and npm test
- name: cd into deploy, npm install
run: | run: |
cd deploy cd deploy
npm i npm i
npm test
- name: test no env
run: |
cd deploy
npm run testNoEnv
- name: test with env
env: env:
NODE_ENV: test REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
HBP_CLIENTID: ${{ secrets.HBP_CLIENTID }}
HBP_CLIENTSECRET: ${{ secrets.HBP_CLIENTSECRET }}
run: |
cd deploy
npm run testEnv
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment