Skip to content

Commit

Permalink
Fix/run test e2e 2024 06 15 (#447)
Browse files Browse the repository at this point in the history
* fix: fixed code
  • Loading branch information
NitichaiSawangsai authored Jun 15, 2024
1 parent 1ee8aa9 commit a4f4f36
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 254 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/gitguardian.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/lint.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/push-tag-version.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/sonar-analysis.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/test-e2e-req-input.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run Test E2E Required Input
on:
workflow_dispatch:
inputs:
version-tag:
description: 'Version tag or branch to test'
required: true
default: 'master'

jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository Test E2E
uses: actions/checkout@v3
with:
repository: NitichaiSawangsai/cypress-ex1
ref: ${{ github.event.inputs.version-tag }}
token: ${{ secrets.REPO_CYPRESS_EX1_ACCESS_TOKEN }}

- name: Install dependencies
run: npm install

- name: Cypress run
uses: cypress-io/github-action@v5

- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos
23 changes: 11 additions & 12 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
name: End-to-end test

name: Run Test E2E
on:
push:
branches:
# push:
# branches:
# - release
pull_request:
branches:
- release
jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
# action clones the repository into this environment,
# making your code available for the workflow steps that follow.
- name: Checkout Repository B
- name: Checkout Repository Test E2E
uses: actions/checkout@v3
with:
repository: NitichaiSawangsai/cypress-ex1 # เปลี่ยนเป็น repository ของคุณ
ref: release # ตรวจสอบจาก branch release
token: ${{ github.token }} # ใช้ Personal Access Token ที่มีสิทธิ์ในการอ่าน Repository secrets.REPO_CYPRESS_EX1_ACCESS_TOKEN

- name: Install Dependencies
run: npm install # ติดตั้ง dependencies ของ Cypress
ref: master # ตรวจสอบจาก branch release
token: ${{ github.token }} # ใช้ Personal Access Token ที่มีสิทธิ์ในการอ่าน Repository REPO_CYPRESS_EX1_ACCESS_TOKEN

- name: Run E2E Tests with Cypress
run: npm run cy:run # แก้ตามคำสั่งที่ใช้ใน Repository B สำหรับรัน Cypress tests
- name: Install dependencies
run: npm install

# Install NPM dependencies, cache them correctly
# and run all Cypress tests
Expand Down

0 comments on commit a4f4f36

Please sign in to comment.