Merge pull request #94 from rajeevmsn/master #313
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: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
# jest-mongodb may not be working on ubuntu-22.04 (https://github.com/shelfio/jest-mongodb/issues/351) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup env variables | |
run: cp .env.dist .env | |
- name: Install modules | |
run: yarn | |
- name: check that the code is linted | |
run: yarn eslint.check | |
- name: Build the react app | |
run: yarn build | |
- name: Run tests | |
run: yarn test | |
deploy: | |
needs: test | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Invoke deployment hook | |
uses: distributhor/workflow-webhook@v2 | |
env: | |
webhook_url: ${{ secrets.WEBHOOK_URL }} | |
webhook_secret: ${{ secrets.WEBHOOK_SECRET }} |