From 4c095884830c062cdb9534dad50633f68f94d85c Mon Sep 17 00:00:00 2001 From: Rena Hashimi Date: Sat, 27 Jul 2024 22:55:19 +0200 Subject: [PATCH 1/4] Create test.yml --- .github/workflows/test.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..2a52cedca0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Automated Unit Testing +on: + pull_request: + workflow_dispatch: + +jobs: + run-unit-tests: + name: Run Unit Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout under $GITHUB_WORKSPACE + uses: actions/checkout@main + + - name: Set up NodeJS + uses: actions/setup-node@v1 + with: + node-version: 16 + + - name: Install all dependencies + run: npm install + + - name: Run Tests + run: npm run test-unit From 64eefc8bc0421c74aee8ebe2bc3e06fef0e7f8c2 Mon Sep 17 00:00:00 2001 From: Rena Hashimi Date: Sat, 27 Jul 2024 23:02:10 +0200 Subject: [PATCH 2/4] Create e2e-test.yml --- .github/workflows/e2e-test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/e2e-test.yml diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml new file mode 100644 index 0000000000..e86e51b31d --- /dev/null +++ b/.github/workflows/e2e-test.yml @@ -0,0 +1,17 @@ +name: Automated E2E Testing +on: + pull_request: + workflow_dispatch: + +jobs: + run-e2e-tests: + name: Run E2E Tests + runs-on: ubuntu-latest + steps: + - name: Checkout under $GITHUB_WORKSPACE + uses: actions/checkout@main + + - name: run cypress tests with electron + uses: cypress-io/github-action@v4 + with: + browser: electron From 98ffefb17034cfd87c72db182f6ff1ca5b08fb9e Mon Sep 17 00:00:00 2001 From: Rena Hashimi Date: Sun, 28 Jul 2024 00:02:21 +0200 Subject: [PATCH 3/4] Update package.json --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3c20c12498..3b64b1da93 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "format": "prettier -w src/**/*.js", "lint": "eslint src/**/*.js", "lint-fix": "eslint src/**/*.js --cache --fix", - "test": "npm run test:unit && npm run test:e2e-cli", - "test:unit": "jest", - "test:e2e": "cypress open", - "test:e2e-cli": "cypress run", + "test": "npm run test-unit && npm run test-e2e-cli", + "test-unit": "jest", + "test-e2e": "cypress open", + "test-e2e-cli": "cypress run", "prepare": "husky install" }, "keywords": [], From 0e31d17070decbb2189bcf1b83b56b1a99743885 Mon Sep 17 00:00:00 2001 From: Rena Hashimi Date: Sun, 28 Jul 2024 00:05:06 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index acf2853add..75d68d9ba8 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,13 @@ The task was to use this existing repository and improve its quality by testing - Prettier - Husky +[![Deploy static content to Pages](https://github.com/renahashimi/Workflow-CA/actions/workflows/pages.yml/badge.svg)](https://github.com/renahashimi/Workflow-CA/actions/workflows/pages.yml) + +[![Automated E2E Testing](https://github.com/renahashimi/Workflow-CA/actions/workflows/e2e-test.yml/badge.svg)](https://github.com/renahashimi/Workflow-CA/actions/workflows/e2e-test.yml) + +[![Automated Unit Testing](https://github.com/renahashimi/Workflow-CA/actions/workflows/test.yml/badge.svg)](https://github.com/renahashimi/Workflow-CA/actions/workflows/test.yml) + + ## Installation & Running 1. Clone the repo