From 5605967c0a724b2ba6d4bc531b45f0388a5d3899 Mon Sep 17 00:00:00 2001 From: Steven Petryk Date: Thu, 7 Mar 2024 11:50:01 -0800 Subject: [PATCH] Call it e2e instead of vrt --- .github/workflows/ci.yml | 110 ++++++++++++------------- .github/workflows/{vrt.yml => e2e.yml} | 8 +- 2 files changed, 60 insertions(+), 58 deletions(-) rename .github/workflows/{vrt.yml => e2e.yml} (68%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8440110..36e120cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,62 +3,62 @@ name: Mafs CI on: [push] jobs: - # build: - # runs-on: ubuntu-latest - # timeout-minutes: 2 - # steps: - # - uses: actions/checkout@v4 - # - uses: pnpm/action-setup@v3 - # - uses: actions/setup-node@v4 - # with: - # cache: "pnpm" - # - run: pnpm install - # - run: pnpm build + build: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + cache: "pnpm" + - run: pnpm install + - run: pnpm build - # tests: - # runs-on: ubuntu-latest - # timeout-minutes: 2 - # steps: - # - uses: actions/checkout@v4 - # - uses: pnpm/action-setup@v3 - # - uses: actions/setup-node@v4 - # with: - # cache: "pnpm" - # - run: pnpm install - # - run: pnpm test:unit + tests: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + cache: "pnpm" + - run: pnpm install + - run: pnpm test:unit - # check-format: - # runs-on: ubuntu-latest - # timeout-minutes: 2 - # steps: - # - uses: actions/checkout@v4 - # - uses: pnpm/action-setup@v3 - # - uses: actions/setup-node@v4 - # with: - # cache: "pnpm" - # - run: pnpm install - # - run: pnpm format:check + check-format: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + cache: "pnpm" + - run: pnpm install + - run: pnpm format:check - # lint: - # runs-on: ubuntu-latest - # timeout-minutes: 2 - # steps: - # - uses: actions/checkout@v4 - # - uses: pnpm/action-setup@v3 - # - uses: actions/setup-node@v4 - # with: - # cache: "pnpm" - # - run: pnpm install - # - run: pnpm lint + lint: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + cache: "pnpm" + - run: pnpm install + - run: pnpm lint - # tsc: - # runs-on: ubuntu-latest - # timeout-minutes: 2 - # steps: - # - uses: actions/checkout@v4 - # - uses: pnpm/action-setup@v3 - # - uses: actions/setup-node@v4 - # with: - # cache: "pnpm" - # - run: pnpm install - # - run: pnpm tsc + tsc: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + cache: "pnpm" + - run: pnpm install + - run: pnpm tsc diff --git a/.github/workflows/vrt.yml b/.github/workflows/e2e.yml similarity index 68% rename from .github/workflows/vrt.yml rename to .github/workflows/e2e.yml index a10c4e75..9bd38a6b 100644 --- a/.github/workflows/vrt.yml +++ b/.github/workflows/e2e.yml @@ -1,14 +1,14 @@ -name: Mafs Visual Tests +name: Mafs End-to-End (E2E) Tests on: pull_request: types: [labeled, synchronize] jobs: - visual-tests: + e2e-tests: runs-on: ubuntu-latest timeout-minutes: 5 - if: contains(github.event.pull_request.labels.*.name, 'visual-changes') + if: contains(github.event.pull_request.labels.*.name, 'run-e2e-tests') steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v3 @@ -16,6 +16,8 @@ jobs: with: cache: "pnpm" - run: pnpm install + # TODO: cache this step, it takes forever. Playwright puts the browsers in ~/.cache somewhere. + # It also doesn't feel very reproducible. - name: Install Playwright Browsers run: pnpm playwright install --with-deps - run: pnpm test:e2e