Continuous Integration #1441
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: Continuous Integration | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
schedule: | |
- cron: '30 8 * * 1,2,3,4,5' | |
jobs: | |
analyze: | |
name: 'Analyze 🐛' | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['typescript'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
unit-test: | |
name: 'Unit Test 🧪' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
env: | |
STORE_FILE_PATH: ${{ github.workspace }}/mock-store.json | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install | |
- name: Run unit tests (with coverage) | |
run: yarn test:cov | |
env: | |
NODE_ENV: test | |
e2e-test: | |
name: 'E2E Test 🧪' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install | |
- name: Run E2E tests | |
run: yarn test:e2e | |
env: | |
NODE_ENV: test | |
dependabot: | |
name: 'Dependabot 🏎️' | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
steps: | |
- name: Dependabot metadata | |
id: dependabot-metadata | |
uses: dependabot/fetch-metadata@v1 | |
- name: Enable auto-merge for Dependabot PRs | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |