diff --git a/.github/workflows/build_server.yml b/.github/workflows/build_server.yml index 8a3dc7776..b891e931a 100644 --- a/.github/workflows/build_server.yml +++ b/.github/workflows/build_server.yml @@ -2,7 +2,7 @@ name: Build server on: push: - branches: [develop, main] + branches: [main, develop] jobs: prepare-env: diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 92f2368c8..bc8b6a0f1 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -3,13 +3,19 @@ name: Generate assets on: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '16.x' - - run: yarn install + node-version: '20' + cache: 'yarn' + - run: yarn install --frozen-lockfile - run: yarn run:generate diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 83a4cfa78..e06a33428 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,14 +1,20 @@ -name: Playwright Tests with Dependency and Artifact Caching +name: Playwright Tests on: - # push: - # branches: [develop, main] - # pull_request: - # branches: [develop, main] + push: + branches: [develop, main] + pull_request: + branches: [develop, main] + +# Prevent multiple runs of the same workflow on the same ref +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: install: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -17,11 +23,18 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" + cache: 'yarn' - - name: Install yarn and dependencies - run: | - npm install -g yarn - yarn install + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Cache Playwright browsers + uses: actions/cache@v3 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + playwright-${{ runner.os }}- - name: Install Playwright browsers run: yarn playwright install --with-deps diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 75587a952..ed9cc5a36 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,16 +1,20 @@ name: Prettier - on: pull_request: branches: [main, develop] push: branches: [main, develop] +# Prevent multiple runs of the same workflow on the same ref +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: - check-prettier: + format: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Check out Git repository uses: actions/checkout@v4 @@ -18,7 +22,13 @@ jobs: uses: actions/setup-node@v3 with: node-version: '20' + cache: 'yarn' - name: Install dependencies - run: yarn - - name: Check code formatting - run: yarn prettier:check + run: yarn install --frozen-lockfile + - name: Format code with Prettier + run: yarn prettier:fix + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: format code with prettier" + branch: ${{ github.head_ref }}