mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 14:03:33 +09:00
## Description
- actions/cache@v3 for pnpm moved to setup-node
- Added on `pull_request`
- restricted push on main.
- Added build cancelation.
- Same behaviour on checkout is preserved as was on push see
```
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
```
## Steps for reproduction
1. click button
2. expect xyz
## Code Review
- [ ] hi @kof, I need you to do
- conceptual review (architecture, feature-correctness)
- detailed review (read every line)
- test it on preview
## Before requesting a review
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
## Before merging
- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Main workflow
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
# cancel in-progress runs on new commits to same PR (gitub.event.number)
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
checks:
|
|
timeout-minutes: 20
|
|
|
|
env:
|
|
DATABASE_URL: postgres://
|
|
AUTH_SECRET: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
|
|
|
|
- uses: ./.github/actions/ci-setup
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
./node_modules/.cache/prettier/.prettier-cache
|
|
key: checks-${{ github.sha }}
|
|
restore-keys: checks-
|
|
|
|
- run: echo ===SHA USED=== ${{ github.event.pull_request.head.sha || github.sha }} # todo: remove after check whats happening on main
|
|
|
|
- run: pnpm prettier --cache --check "**/*.{js,md,ts,tsx}"
|
|
|
|
- run: pnpm turbo run size-test build checks dts
|