Skip to content

Commit

Permalink
fix the manual workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRaslan committed Jan 9, 2022
1 parent 0410984 commit 322ebc7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"projects": {
"MAIN": "utasks-main",
"STAGE": "utasks-stage",
"DEV": "utasks-dev"
"DEVELOP": "utasks-dev"
},
"targets": {}
}
2 changes: 1 addition & 1 deletion .github/workflows/code-quality-pipline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

- name: Set the project environment to DEVELOP
if: ${{ contains( github.base_ref , 'develop' ) }}
run: yarn firebase use DEV --token ${{ secrets.FIREBASE_TOKEN }}
run: yarn firebase use DEVELOP --token ${{ secrets.FIREBASE_TOKEN }}

- name: Set the project environment to STAGE
if: ${{ contains( github.base_ref , 'stage' ) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: yarn

- name: Set the project environment
run: yarn firebase use DEV --token ${{ secrets.FIREBASE_TOKEN }}
run: yarn firebase use DEVELOP --token ${{ secrets.FIREBASE_TOKEN }}

- name: Auto generating the firebase configuration
run: yarn firebase apps:sdkconfig web --token ${{ secrets.FIREBASE_TOKEN }} --json | tail -n +3 |head -n -1 > ./src/utasks-configuration.json
Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/manually-triggered-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: ⚒️Testing cypress scripts running on CI⚒️
name: Testing Deployed Website

on:
workflow_dispatch:
inputs:
TESTING_URL:
description: 'Choose in which website to run script on it [MAIN , STAGE or DEVELOP]'
description: 'Choose which website should be tested'
type: choice
required: true
default: 'MAIN'
options:
- MAIN
- STAGE
- DEVELOP

jobs:
cypress-tests:
Expand Down Expand Up @@ -39,22 +44,12 @@ jobs:
- name: Remove the reports
run: yarn ci:remove:reports

- name: Set the project environment to DEVELOP
if: ${{ contains( github.event.inputs.TESTING_URL , 'DEVELOP' ) }}
run: yarn firebase use DEV --token ${{ secrets.FIREBASE_TOKEN }}

- name: Set the project environment to STAGE
if: ${{ contains( github.event.inputs.TESTING_URL , 'STAGE' ) }}
run: yarn firebase use STAGE --token ${{ secrets.FIREBASE_TOKEN }}

- name: Set the project environment to MAIN
if: ${{ contains( github.event.inputs.TESTING_URL , 'MAIN' ) }}
run: yarn firebase use MAIN --token ${{ secrets.FIREBASE_TOKEN }}
- name: Set the project environment to ${{github.event.inputs.TESTING_URL}}
run: yarn firebase use ${{github.event.inputs.TESTING_URL}} --token ${{ secrets.FIREBASE_TOKEN }}

- name: Auto generating the firebase configuration
run: yarn firebase apps:sdkconfig web --token ${{ secrets.FIREBASE_TOKEN }} --json | tail -n +3 |head -n -1 > ./src/utasks-configuration.json


- run: echo "🖥️ The workflow is now ready to start cypress tests the ${{ github.repository }} code in the ${{matrix.browser}} browser."

- name: 🙈 UI Tests - On ${{ matrix.browser }}
Expand All @@ -63,8 +58,7 @@ jobs:
with:
browser: ${{ matrix.browser }}
headless: true
command: yarn ci:cy:run -- --env TESTING_URL=${{github.event.inputs.TESTING_URL || 'MAIN' }}

command: yarn ci:cy:run -- --env TESTING_URL=${{github.event.inputs.TESTING_URL}}

- name: 👀 Generate the testing report
if: always()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ UTasks is a **[Todoist](https://todoist.com/)** clone, meant for testing purpose
## :wink: Features

- A simple feature-rich website but a bit tricky to work with.
- Simple & easy to set up and run in your local machine or deploy it publicly under 10 mins
- Simple & easy to set up and run in your local machine or deploy it publicly
- Doesn't require a lot of knowledge to set it up "Just a **[Google Account](https://accounts.google.com/signup/)** and **[Nodejs](https://nodejs.org/en/)**"
- Created using **[Create React App](https://create-react-app.dev/)** as **Frontend** and **[Firestore](https://firebase.google.com/docs/firestore)** as **Backend**

Expand Down Expand Up @@ -71,7 +71,7 @@ To setup you own, check out the **[Prerequisites](#Prerequisites)**,and the **[S

#### :fire: Local setup

- Run the app locally by running the **`yarn react-scripts start`** and it will be open in **[Localhost:5050](http://localhost:5050)** :
- Run the app locally by running the **`yarn react-scripts start`** and it will be open in **[Localhost:5050](http://localhost:5050)**

#### :rocket: (Optional) Make it online

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"build": "GENERATE_SOURCEMAP=false react-scripts build",
"build:with:map": "react-scripts build",
"winBuild:prod": "set \"GENERATE_SOURCEMAP=false\" && react-scripts build",
"firebase:set:dev": "firebase use DEV && firebase apps:sdkconfig web --json > ./src/utasks-configuration.json",
"firebase:set:dev": "firebase use DEVELOP && firebase apps:sdkconfig web --json > ./src/utasks-configuration.json",
"firebase:local:deploy": "firebase emulators:start --only hosting:utasks-develop",
"analyze": "source-map-explorer 'build/static/js/*.js'",
"prepare": "husky install",
Expand Down

0 comments on commit 322ebc7

Please sign in to comment.