fix: do not make e2e depend on build #4
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: Build | |
on: | |
pull_request: | |
types: [synchronize, opened, reopened] | |
push: | |
branches: | |
- main | |
- master | |
- releases/* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
id: buildx | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ github.repository }}-build-v1-${{ github.sha }} | |
restore-keys: | | |
${{ github.repository }}-build-v1- | |
- name: Build | |
run: | | |
docker buildx build --platform=linux/amd64 --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache --progress plain --builder ${{ steps.buildx.outputs.name }} . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install Dependencies | |
run: | | |
bun install --frozen-lockfile | |
- name: Lint | |
run: | | |
bun lint | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install Dependencies | |
run: | | |
bun install --frozen-lockfile | |
- name: Test | |
run: | | |
bun run test:ci | |
e2e-test: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install Dependencies | |
run: | | |
bun install --frozen-lockfile | |
bunx playwright install --with-deps | |
- name: Test | |
run: | | |
bunx playwright test | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
code-analysis: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: 'javascript' | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: '/language:javascript' |