Upgrade faims3-data-model and remove some debug output #2888
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Lint, build, test, cap doctor | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
- staging | |
- trying | |
pull_request: | |
types: [opened, reopened, edited, ready_for_review] | |
# Also trigger on page_build, as well as release created events | |
page_build: | |
release: | |
types: # This configuration does not affect the page_build event above | |
- created | |
jobs: | |
build: | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error | |
runs-on: ubuntu-latest | |
services: | |
couchdb: | |
image: couchdb:3 | |
ports: | |
- 5984:5984 | |
env: | |
COUCHDB_USER: admin | |
COUCHDB_PASSWORD: password | |
env: | |
COUCHDB_USER: admin | |
COUCHDB_PASSWORD: password | |
REACT_APP_DIRECTORY_HOST: localhost | |
REACT_APP_USE_REAL_DATA: true | |
COUCHDB_CURL_HOST: http://admin:password@localhost:5984 | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
node-version: ['20'] | |
experimental: [false] | |
# include: | |
# - node-version: 'current' #, 16 ok, it looks like v2 doesn't support /nv even though the docs say it does. Hardcoding version for now. | |
# experimental: true # https://www.npmjs.com/package/@pkgjs/nv ? maybe? | |
# - node-version: 'latest' | |
# experimental: true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
# setup CORS for couchdb | |
- run: curl -X PUT $COUCHDB_CURL_HOST/_node/_local/_config/httpd/enable_cors -d '"true"' | |
- run: curl -X PUT $COUCHDB_CURL_HOST/_node/_local/_config/cors/origins -d '"*"' | |
- run: curl -X PUT $COUCHDB_CURL_HOST/_node/_local/_config/cors/origins -d '"http://localhost"' | |
- run: curl -X PUT $COUCHDB_CURL_HOST/_node/_local/_config/cors/credentials -d '"true"' | |
- run: curl -X PUT $COUCHDB_CURL_HOST/_node/_local/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"' | |
- run: curl -X PUT $COUCHDB_CURL_HOST/_node/_local/_config/cors/headers -d '"accept, authorization, content-type, origin, referer, x-csrf-token"' | |
# do the npm stuff | |
- run: npm ci | |
- run: npm run lint | |
- run: npm run build --if-present || ${{ matrix.experimental }} | |
- run: npm run test || ${{ matrix.experimental }} | |
- run: npx cap copy || ${{ matrix.experimental }} | |
# cap doctor broken for android just now | |
# - run: npx cap doctor android || ${{ matrix.experimental }} # ios requires xcode |