first commit

This commit is contained in:
2025-04-04 08:46:42 +02:00
commit 482571d558
4 changed files with 52 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.idea
.DS_Store

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM cypress/base:22.13.1
RUN npm config set @skydust:registry=https://gitea.skydust.fr/api/packages/skydust/npm/
RUN npm install -g @skydust/toolkit@1.2.3
RUN npm install -g corepack@latest
RUN apt-get update
RUN apt-get install --yes firefox-esr
RUN apt-get clean
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

13
action.yml Normal file
View File

@@ -0,0 +1,13 @@
name: Cypress runner
description: Runs the cypress binary from the project
author: Skydust
# Define your inputs here.
inputs:
baseUrl:
description: The server url
required: true
runs:
using: docker
image: Dockerfile

23
entrypoint.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
INPUT_BASE_URL=$baseUrl
set -e
CY_ACTION_PATH="/e2e"
cd "${CY_ACTION_PATH}"
export CYPRESS_BASE_URL="${INPUT_BASE_URL}"
if ! [[ -d "node_modules" ]]; then
log_info "$(red)Error: No node_modules found"
exit 1
fi
log_info "Install cypress binaries"
npx cypress install
log_info "Running cypress cy:test"
npm run cy:test