Support for cosmos codegen #225
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: PR | |
on: | |
pull_request: | |
paths-ignore: | |
- '.github/workflows/**' | |
jobs: | |
code-style: | |
name: code-style | |
runs-on: ubuntu-latest | |
env: | |
SUBQL_ACCESS_TOKEN: ${{ secrets.SUBQL_ACCESS_TOKEN }} | |
SUBQL_ACCESS_TOKEN_TEST: ${{ secrets.SUBQL_ACCESS_TOKEN_TEST }} | |
SUBQL_ORG_TEST: ${{ secrets.SUBQL_ORG_TEST }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- run: yarn | |
- name: build | |
run: yarn build | |
- name: code-style check | |
run: yarn pretty-quick --check --pattern 'packages/*/src/**/*' --branch origin/main | |
- name: lint | |
run: yarn lint | |
coverage: | |
name: Coverage report | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DB_USER: postgres | |
DB_PASS: postgres | |
DB_DATABASE: postgres | |
DB_HOST: postgres | |
DB_PORT: 5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Installing dependencies | |
run: yarn install | |
- uses: artiomtr/jest-coverage-report-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skip-step: install | |
working-directory: ${{ matrix.path }} | |
test-script: yarn test-jest | |
annotations: none |