Bump version #298
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: CI | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
jobs: | |
fixups: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Check if there are fixup commits | |
run: git log --pretty=format:%s origin/master.. | xargs | grep -v fixup | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check version bump | |
run: git diff --diff-filter=M origin/master -- "package.json" | grep "version" | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mongo: | |
image: mongo:4-bionic | |
ports: | |
- 27017/tcp | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.16.0 | |
- name: Install yarn | |
run: npm install --global [email protected] | |
- name: Install dependencies | |
run: yarn | |
- name: Lint | |
run: npx -q eslint@^7.24.0 . | |
- name: Build | |
run: yarn build | |
- name: Run tests with mongodb cache empty | |
env: | |
MONGO_URL: mongodb://localhost:${{ job.services.mongo.ports['27017'] }}/raiapi-test | |
APIARY_API_KEY: ${{ secrets.APIARY_API_KEY }} | |
NODE_ENV: test | |
PORT: 3333 | |
run: | | |
npx -q dredd@^13.1.2 | |
npx -q jest@^29.7 --collectCoverage --forceExit | |
- name: Run tests with mongodb cache full | |
env: | |
MONGO_URL: mongodb://localhost:${{ job.services.mongo.ports['27017'] }}/raiapi-test | |
APIARY_API_KEY: ${{ secrets.APIARY_API_KEY }} | |
NODE_ENV: test | |
PORT: 3333 | |
run: | | |
npx -q dredd@^13.1.2 | |
npx -q jest@^29.7 --collectCoverage --forceExit | |
- name: Run tests with mongodb cache not available | |
env: | |
APIARY_API_KEY: ${{ secrets.APIARY_API_KEY }} | |
NODE_ENV: test | |
PORT: 3333 | |
run: | | |
npx -q dredd@^13.1.2 | |
npx -q jest@^29.7 --collectCoverage --forceExit |