chore: Add e2e tests to PR workflow #8
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: Pull request | |
'on': | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: 'Test' | |
env: | |
NODE_OPTIONS: --max-old-space-size=4096 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version}} | |
- name: Log node version | |
run: node --version | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint | |
- name: Run prettier | |
run: yarn prettier:check | |
- name: Run tsc | |
run: yarn tsc | |
- name: Run build | |
run: yarn build:all | |
- name: Run test | |
run: yarn test | |
e2e-test: | |
name: 'E2E Test' | |
env: | |
NODE_OPTIONS: --max-old-space-size=4096 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version}} | |
- name: Log node version | |
run: node --version | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint | |
- name: Run prettier | |
run: yarn prettier:check | |
- name: Run tsc | |
run: yarn tsc | |
- name: Run build | |
run: yarn build:all | |
- uses: JarvusInnovations/background-action@v1 | |
name: Start application | |
with: | |
run: yarn dev | |
wait-on: http://localhost:7007/settings | |
- name: Run e2e tests | |
run: yarn test:e2e | |
semanticpr: | |
name: Semantic Pull Request | |
runs-on: ubuntu-latest | |
steps: | |
- uses: amannn/action-semantic-pull-request@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pre-commit: | |
name: 'Pre-commit hooks' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- uses: pre-commit/[email protected] |