From 38c3d6c423686a79230e6f7abc0e4cb47cce219e Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 3 Jan 2024 15:33:47 +0100 Subject: [PATCH] [CI] Forgejo Actions e2e tests (cherry picked from commit 430f7d651902ab1e3e44ae27d9821d9132ee8a63) (cherry picked from commit b33f3e2fe82d1e8d5368024938333e6a8c907e76) (cherry picked from commit 5d4f9e47165a3c0adb30a078e6605b62cadbfc50) (cherry picked from commit 33b4f02d90fec41d8525b22f312afa564c955067) (cherry picked from commit fe783424e1e7c999446277f5d34f3885c861092f) --- .forgejo/workflows/e2e.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .forgejo/workflows/e2e.yml diff --git a/.forgejo/workflows/e2e.yml b/.forgejo/workflows/e2e.yml new file mode 100644 index 000000000..f7c46dd06 --- /dev/null +++ b/.forgejo/workflows/e2e.yml @@ -0,0 +1,37 @@ +name: e2e + +on: + pull_request: + paths: + - Makefile + - .forgejo/workflows/e2e.yml + - tests/e2e/** + +jobs: + test-e2e: + if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} + 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: + go-version: "~1.21" + check-latest: true + - 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: | + su forgejo -c 'make test-e2e-sqlite' + timeout-minutes: 40 + env: + DEPS_PLAYWRIGHT: 1 + USE_REPO_TEST_DIR: 1