Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cypress e2e Integration test in the GH action CI #1144

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,55 @@ jobs:
sematic/ui/tests/cypress_results


nodejs-integration-test:
needs: [nodejs_init]
runs-on: ubuntu-latest
container:
image: cypress/browsers:22.12.0
options: --user 0
steps:
- name: write env vars
run: echo "TEMP_DIR=$(mktemp -d)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: nodejs-cache
path: ${{ env.TEMP_DIR }}
- name: Extract
run: |
mkdir -p $CYPRESS_CACHE_FOLDER
PROJECT_FOLDER=${{ needs.nodejs_init.outputs.projectFolder }}
mkdir -p $PROJECT_FOLDER
tar -xzf $TEMP_DIR/cypress.tar.gz -C /
tar -xzf $TEMP_DIR/code.tar.gz -C /
- name: build-essential
run: apt update && apt-get install -y build-essential curl wget libmagic1
- name: install uv
run: wget -qO- https://astral.sh/uv/install.sh | sh
- name: Py-prep
run: make py-prep
- name: build ui
run: npm run build
working-directory: sematic/ui
- name: start sematic run
run: . .venv/bin/activate && sematic start && sematic run examples/add
- name: cypress:e2e
run: npm run cypress:e2e
working-directory: sematic/ui
- name: Upload cypress video
uses: actions/upload-artifact@v4
with:
name: cypress_video
path: |
sematic/ui/tests/cypress_video
- name: Upload cypress screenshots
uses: actions/upload-artifact@v4
with:
name: cypress_screenshots
path: |
sematic/ui/tests/cypress_screenshots
- name: Upload cypress test results
uses: actions/upload-artifact@v4
with:
name: cypress_results
path: |
sematic/ui/tests/cypress_results
Loading