ci: updates actions/upload-artifact to v4 & explicitly use ubuntu-24.04 instead of latest (#10898)

### What

- Updates actions/upload-artifact from `v3` to `v4` in github actions
workflow.
- Install playwright in pipeline instead of npm script

---------

Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
This commit is contained in:
Patrik
2025-02-17 15:14:51 -05:00
committed by GitHub
parent 276a6dde06
commit 106d7dde23
9 changed files with 90 additions and 60 deletions

View File

@@ -13,7 +13,7 @@ on:
jobs:
on-labeled-ensure-one-status:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
# Only run on issue labeled and if label starts with 'status:'
@@ -49,7 +49,7 @@ jobs:
}
on-issue-close:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
if: github.event.action == 'closed'
@@ -82,7 +82,7 @@ jobs:
}
on-issue-reopen:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
if: github.event.action == 'reopened'
@@ -93,7 +93,7 @@ jobs:
labels: 'status: needs-triage'
on-issue-assigned:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
if: >
@@ -106,11 +106,11 @@ jobs:
labels: 'status: needs-triage'
# on-pr-merge:
# runs-on: ubuntu-latest
# runs-on: ubuntu-24.04
# if: github.event.pull_request.merged == true
# steps:
# on-pr-close:
# runs-on: ubuntu-latest
# runs-on: ubuntu-24.04
# if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == false
# steps:

View File

@@ -11,7 +11,7 @@ permissions:
jobs:
lock_issues:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Lock issues
uses: dessant/lock-threads@v5

View File

@@ -2,13 +2,13 @@ name: build
on:
pull_request:
types: [ opened, reopened, synchronize ]
types: [opened, reopened, synchronize]
push:
branches: [ 'main' ]
branches: ['main']
jobs:
changes:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
pull-requests: read
outputs:
@@ -42,7 +42,7 @@ jobs:
core-build:
needs: changes
if: ${{ needs.changes.outputs.needs_build == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
@@ -53,10 +53,10 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Install pnpm
uses: pnpm/action-setup@v3
@@ -88,7 +88,7 @@ jobs:
key: ${{ github.sha }}-${{ github.run_number }}
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: core-build
strategy:
fail-fast: false
@@ -108,10 +108,10 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Install pnpm
uses: pnpm/action-setup@v3
@@ -131,7 +131,7 @@ jobs:
- name: Start PostgreSQL
uses: CasperWA/postgresql-action@v1.2
with:
postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions
postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions
postgresql db: ${{ env.POSTGRES_DB }}
postgresql user: ${{ env.POSTGRES_USER }}
postgresql password: ${{ env.POSTGRES_PASSWORD }}
@@ -181,22 +181,22 @@ jobs:
POSTGRES_URL: ${{ env.POSTGRES_URL }}
tests-e2e:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: core-build
strategy:
fail-fast: false
matrix:
part: [ 1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8 ]
part: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
steps:
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Install pnpm
uses: pnpm/action-setup@v3
@@ -210,6 +210,28 @@ jobs:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
- name: Store Playwright's Version
run: |
# Extract the version number using a more targeted regex pattern with awk
PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --depth=0 | awk '/@playwright\/test/ {print $2}')
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
- name: Cache Playwright Browsers for Playwright's Version
id: cache-playwright-browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
- name: Setup Playwright - Browsers and Dependencies
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium
- name: Setup Playwright - Dependencies-only
if: steps.cache-playwright-browsers.outputs.cache-hit == 'true'
run: pnpm exec playwright install-deps chromium
- name: E2E Tests
uses: nick-fields/retry@v2
with:
@@ -218,7 +240,7 @@ jobs:
timeout_minutes: 15
command: pnpm test:e2e --part ${{ matrix.part }} --bail
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
@@ -226,7 +248,7 @@ jobs:
retention-days: 1
tests-type-generation:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: core-build
steps:
@@ -234,10 +256,10 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Install pnpm
uses: pnpm/action-setup@v3
@@ -258,7 +280,7 @@ jobs:
run: pnpm dev:generate-graphql-schema graphql-schema-gen
build-packages:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: core-build
strategy:
fail-fast: false
@@ -278,10 +300,10 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Install pnpm
uses: pnpm/action-setup@v3
@@ -299,7 +321,7 @@ jobs:
run: pnpm turbo run build --filter=${{ matrix.pkg }}
plugins:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: core-build
strategy:
fail-fast: false
@@ -319,10 +341,10 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Install pnpm
uses: pnpm/action-setup@v3
@@ -346,11 +368,11 @@ jobs:
templates:
needs: changes
if: ${{ needs.changes.outputs.templates == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
template: [ blank, website, ecommerce ]
template: [blank, website, ecommerce]
steps:
- uses: actions/checkout@v4
@@ -361,10 +383,10 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Use Node.js 20
- name: Use Node.js 22.6.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.6.0
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0

View File

@@ -8,7 +8,7 @@ on:
jobs:
post_release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:

View File

@@ -5,7 +5,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Echo
run: echo "Register release-canary workflow"

View File

@@ -5,7 +5,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write

View File

@@ -18,7 +18,7 @@ permissions:
jobs:
debug-context:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: View context attributes
uses: actions/github-script@v7
@@ -27,7 +27,7 @@ jobs:
label-created-by:
name: label-on-open
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Tag with 'created-by'
uses: actions/github-script@v7
@@ -89,7 +89,7 @@ jobs:
triage:
name: initial-triage
if: github.event_name == 'issues'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with: