first commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.idea
|
||||
.DS_Store
|
||||
14
Dockerfile
Normal file
14
Dockerfile
Normal 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
13
action.yml
Normal 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
|
||||
19
entrypoint.sh
Normal file
19
entrypoint.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
INPUT_BASE_URL=$baseUrl
|
||||
|
||||
set -e
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user