add winston logger #78
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: build-express | |
on: | |
pull_request: | |
paths: | |
- 'packages/express/**' | |
- '.github/workflows/build-express.yml' | |
jobs: | |
build-express-app: | |
runs-on: ubuntu-latest # todo: use whatever is on the DO droplet | |
steps: | |
- run: echo "🎉 The job was triggered by a ${{ github.event_name }} on commit ${{ github.SHA }}" | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Start CouchDB | |
uses: iamssen/couchdb-github-action@master | |
with: | |
couchdb-version: 3.3.2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install -g [email protected] | |
- run: npm install -g [email protected] # 4.0.0 ? | |
#- run: npm install -g [email protected] | |
- run: lerna bootstrap | |
- name: Build and Test | |
run: | | |
echo COUCHDB_SERVER=localhost:5984 >> ./packages/express/.env.development.local | |
echo COUCHDB_PROTOCOL=http >> ./packages/express/.env.development.local | |
echo COUCHDB_ADMIN=admin >> ./packages/express/.env.development.local | |
echo COUCHDB_PASSWORD=password >> ./packages/express/.env.development.local | |
echo VERSION=${{ github.SHA }} >> ./packages/express/.env.development.local | |
cd ./packages/express | |
yarn remove @types/jest | |
yarn remove @types/pouchdb | |
yarn build | |
nohup yarn serve & # Run the server in the background | |
sleep 15s | |
yarn testif [ $? -eq 0 ]; then | |
echo "Tests passed, ending GitHub Action." | |
exit 1 | |
fi |