mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-12-25 11:11:22 +01:00
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
205 lines
6.5 KiB
YAML
205 lines
6.5 KiB
YAML
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
|
|
name: "Frontend tests powered by Sauce Labs"
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
playwright-chrome:
|
|
env:
|
|
PNPM_HOME: ~/.pnpm-store
|
|
name: Playwright Chrome
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Generate Sauce Labs strings
|
|
id: sauce_strings
|
|
run: |
|
|
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
|
-
|
|
name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
- uses: actions/cache@v4
|
|
name: Setup gnpm cache
|
|
if: always()
|
|
with:
|
|
path: |
|
|
${{ env.PNPM_HOME }}
|
|
~/.cache/ms-playwright
|
|
~/.local/share/gnpm
|
|
/usr/local/bin/gnpm
|
|
/usr/local/bin/gnpm-0.0.12
|
|
key: ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gnpm-store-
|
|
- name: Setup gnpm
|
|
uses: SamTV12345/gnpm-setup@main
|
|
with:
|
|
version: 0.0.12
|
|
-
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
run: gnpm install --frozen-lockfile
|
|
-
|
|
name: export GIT_HASH to env
|
|
id: environment
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
|
-
|
|
name: Create settings.json
|
|
run: cp ./src/tests/settings.json settings.json
|
|
- name: Run the frontend tests
|
|
shell: bash
|
|
run: |
|
|
gnpm run prod &
|
|
connected=false
|
|
can_connect() {
|
|
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
|
connected=true
|
|
}
|
|
now() { date +%s; }
|
|
start=$(now)
|
|
while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
|
|
sleep 1
|
|
done
|
|
cd src
|
|
gnpm exec playwright install chromium --with-deps
|
|
gnpm run test-ui --project=chromium
|
|
- uses: actions/upload-artifact@v5
|
|
if: always()
|
|
with:
|
|
name: playwright-report-${{ matrix.node }}-chrome
|
|
path: src/playwright-report/
|
|
retention-days: 30
|
|
playwright-firefox:
|
|
env:
|
|
PNPM_HOME: ~/.pnpm-store
|
|
name: Playwright Firefox
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Generate Sauce Labs strings
|
|
id: sauce_strings
|
|
run: |
|
|
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
- uses: actions/cache@v4
|
|
name: Setup gnpm cache
|
|
if: always()
|
|
with:
|
|
path: |
|
|
${{ env.PNPM_HOME }}
|
|
~/.local/share/gnpm
|
|
~/.cache/ms-playwright
|
|
/usr/local/bin/gnpm
|
|
/usr/local/bin/gnpm-0.0.12
|
|
key: ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gnpm-store-
|
|
- name: Setup gnpm
|
|
uses: SamTV12345/gnpm-setup@main
|
|
with:
|
|
version: 0.0.12
|
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
|
run: gnpm install --frozen-lockfile
|
|
- name: export GIT_HASH to env
|
|
id: environment
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
|
- name: Create settings.json
|
|
run: cp ./src/tests/settings.json settings.json
|
|
- name: Run the frontend tests
|
|
shell: bash
|
|
run: |
|
|
gnpm run prod &
|
|
connected=false
|
|
can_connect() {
|
|
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
|
connected=true
|
|
}
|
|
now() { date +%s; }
|
|
start=$(now)
|
|
while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
|
|
sleep 1
|
|
done
|
|
cd src
|
|
gnpm exec playwright install firefox --with-deps
|
|
gnpm run test-ui --project=firefox
|
|
- uses: actions/upload-artifact@v5
|
|
if: always()
|
|
with:
|
|
name: playwright-report-${{ matrix.node }}-firefox
|
|
path: src/playwright-report/
|
|
retention-days: 30
|
|
playwright-webkit:
|
|
name: Playwright Webkit
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PNPM_HOME: ~/.pnpm-store
|
|
steps:
|
|
-
|
|
name: Generate Sauce Labs strings
|
|
id: sauce_strings
|
|
run: |
|
|
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
|
-
|
|
name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
- uses: actions/cache@v4
|
|
name: Setup gnpm cache
|
|
if: always()
|
|
with:
|
|
path: |
|
|
${{ env.PNPM_HOME }}
|
|
~/.local/share/gnpm
|
|
~/.cache/ms-playwright
|
|
/usr/local/bin/gnpm
|
|
/usr/local/bin/gnpm-0.0.12
|
|
key: ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: ${{ runner.os }}-gnpm-store-
|
|
- name: Setup gnpm
|
|
uses: SamTV12345/gnpm-setup@main
|
|
with:
|
|
version: 0.0.12
|
|
-
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
run: gnpm install --frozen-lockfile
|
|
-
|
|
name: export GIT_HASH to env
|
|
id: environment
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
|
-
|
|
name: Create settings.json
|
|
run: cp ./src/tests/settings.json settings.json
|
|
- name: Run the frontend tests
|
|
shell: bash
|
|
run: |
|
|
gnpm run prod &
|
|
connected=false
|
|
can_connect() {
|
|
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
|
connected=true
|
|
}
|
|
now() { date +%s; }
|
|
start=$(now)
|
|
while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
|
|
sleep 1
|
|
done
|
|
cd src
|
|
gnpm exec playwright install webkit --with-deps
|
|
gnpm run test-ui --project=webkit || true
|
|
- uses: actions/upload-artifact@v5
|
|
if: always()
|
|
with:
|
|
name: playwright-report-${{ matrix.node }}-webkit
|
|
path: src/playwright-report/
|
|
retention-days: 30
|
|
|
|
|
|
|