make it easier to switch network locally (#300) #18
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: Verify | |
on: | |
push: | |
pull_request: | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
name: Formatting | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actionsx/prettier@v2 | |
with: | |
args: --check . | |
verify-frontend: | |
runs-on: ubuntu-latest | |
name: Build Frontend | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.17.0 | |
cache: "yarn" | |
- run: yarn install | |
- run: yarn workspace @agora/common codegen | |
- run: yarn workspace @agora/frontend codegen | |
- uses: reviewdog/action-eslint@v1 | |
with: | |
workdir: "packages/frontend" | |
eslint_flags: "'**/*.{ts,tsx}'" | |
- uses: EPMatt/reviewdog-action-tsc@v1 | |
with: | |
workdir: "packages/frontend" | |
- name: Build | |
working-directory: ./packages/frontend | |
run: yarn build | |
build-backend: | |
runs-on: ubuntu-latest | |
name: Build Backend | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.17.0 | |
cache: "yarn" | |
- run: yarn install | |
- run: yarn workspace @agora/common codegen | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: package/render-opengraph | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: wasm-pack | |
- name: Build render-opengraph | |
working-directory: ./packages/render-opengraph | |
run: | | |
wasm-pack build --target web | |
rm pkg/render_opengraph_bg.wasm.d.ts | |
- run: yarn workspace @agora/backend run generate | |
- uses: EPMatt/reviewdog-action-tsc@v1 | |
with: | |
workdir: "packages/backend" | |
- uses: reviewdog/action-eslint@v1 | |
with: | |
workdir: "packages/backend" | |
eslint_flags: "'**/*.ts'" | |
- name: Run Test | |
working-directory: ./packages/backend | |
run: yarn test | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: Backend Tests | |
path: ./packages/backend/dist/reports/junit.xml | |
reporter: jest-junit |