2024-01-03 15:33:47 +01:00
|
|
|
name: e2e
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- Makefile
|
2024-07-08 15:11:29 +02:00
|
|
|
- playwright.config.js
|
2024-01-03 15:33:47 +01:00
|
|
|
- .forgejo/workflows/e2e.yml
|
|
|
|
- tests/e2e/**
|
2024-07-08 15:11:29 +02:00
|
|
|
- web_src/js/**
|
2024-01-03 15:33:47 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-e2e:
|
2024-11-13 22:59:51 +01:00
|
|
|
if: vars.ROLE == 'forgejo-coding' || vars.ROLE == 'forgejo-testing'
|
2024-01-03 15:33:47 +01:00
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: 'docker.io/node:20-bookworm'
|
|
|
|
steps:
|
|
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- uses: https://code.forgejo.org/actions/setup-go@v4
|
|
|
|
with:
|
2024-04-05 05:31:00 +02:00
|
|
|
go-version: "1.22"
|
2024-03-06 05:14:34 +01:00
|
|
|
check-latest: true
|
2024-01-03 15:33:47 +01:00
|
|
|
- run: |
|
|
|
|
apt-get -qq update
|
|
|
|
apt-get -qq install -q sudo
|
|
|
|
sed -i -e 's/%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers
|
|
|
|
git config --add safe.directory '*'
|
|
|
|
adduser --quiet --comment forgejo --disabled-password forgejo
|
|
|
|
adduser forgejo sudo
|
|
|
|
chown -R forgejo:forgejo .
|
|
|
|
- run: |
|
|
|
|
su forgejo -c 'make deps-frontend frontend deps-backend'
|
|
|
|
- run: |
|
2024-01-08 15:58:44 +01:00
|
|
|
su forgejo -c 'make generate test-e2e-sqlite'
|
2024-01-03 15:33:47 +01:00
|
|
|
timeout-minutes: 40
|
|
|
|
env:
|
|
|
|
DEPS_PLAYWRIGHT: 1
|
|
|
|
USE_REPO_TEST_DIR: 1
|