| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- name: Build & Test
- on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
- env:
- CI: true
- node: 12.x
- jobs:
- build:
- name: build
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
- - name: Use Node.js ${{ env.node }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ env.node }}
- - name: Install & build
- run: |
- yarn install
- yarn bootstrap
- yarn build
- unit-tests:
- name: unit tests
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
- - name: Use Node.js ${{ env.node }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ env.node }}
- - name: Install & build
- run: |
- yarn install
- yarn bootstrap
- yarn lerna run ci
- - name: Unit tests
- run: yarn test
- e2e-tests:
- name: e2e tests
- runs-on: ubuntu-latest
- services:
- mysql:
- image: bitnami/mariadb:10.3
- env:
- ALLOW_EMPTY_PASSWORD: yes
- ports:
- - 3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
- postgres:
- image: postgres:12
- env:
- POSTGRES_PASSWORD: Be70
- ports:
- - 5432
- options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
- elastic:
- image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1
- env:
- discovery.type: single-node
- bootstrap.memory_lock: true
- ES_JAVA_OPTS: -Xms512m -Xmx512m
- ports:
- - 9200
- options: --health-cmd="curl --silent --fail localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=3
- strategy:
- matrix:
- db: [sqljs, mysql, postgres]
- steps:
- - uses: actions/checkout@v1
- - name: Use Node.js ${{ env.node }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ env.node }}
- - name: Install & build
- run: |
- yarn install
- yarn bootstrap
- yarn lerna run ci
- - name: e2e tests
- env:
- E2E_MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
- E2E_POSTGRES_PORT: ${{ job.services.postgres.ports['5432'] }}
- E2E_ELASTIC_PORT: ${{ job.services.elastic.ports['9200'] }}
- DB: ${{ matrix.db }}
- run: yarn e2e
|