Merge branch 'dev-mtanti' of https://github.com/MLRS/gabra-api into d… #48
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: Run tests | |
on: | |
push: | |
branches-ignore: | |
- production | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10.x, 12.x] | |
mongodb-version: [3.2, 4.2] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install | |
run: npm ci | |
- name: Create server-config.js | |
run: mv server-config.test.js server-config.js | |
- name: Start MongoDB | |
uses: superchargejs/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: Populate database | |
run: node scripts/node/populate.js test/data/*.json && node scripts/node/resolve-lexeme-ids.js | |
- name: Creating indexes | |
run: node scripts/node/create-indexes.js | |
- name: Build glosses collection | |
run: cd scripts/node && ./run.js update-glosses-collection.js | |
- name: Run tests | |
run: npm test |