diff --git a/.firebaserc b/.firebaserc index a1392c9..8fbdce1 100644 --- a/.firebaserc +++ b/.firebaserc @@ -2,7 +2,7 @@ "projects": { "MAIN": "utasks-main", "STAGE": "utasks-stage", - "DEV": "utasks-dev" + "DEVELOP": "utasks-dev" }, "targets": {} } diff --git a/.github/workflows/code-quality-pipline.yaml b/.github/workflows/code-quality-pipline.yaml index bbabd7a..637b120 100644 --- a/.github/workflows/code-quality-pipline.yaml +++ b/.github/workflows/code-quality-pipline.yaml @@ -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' ) }} diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 692fc58..e23d4fc 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -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 diff --git a/.github/workflows/manually-triggered-tests.yaml b/.github/workflows/manually-triggered-tests.yaml index d5f6920..3329585 100644 --- a/.github/workflows/manually-triggered-tests.yaml +++ b/.github/workflows/manually-triggered-tests.yaml @@ -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: @@ -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 }} @@ -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() diff --git a/README.md b/README.md index 6326f12..90b3a96 100644 --- a/README.md +++ b/README.md @@ -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** @@ -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 diff --git a/package.json b/package.json index ea73458..6bc63a4 100644 --- a/package.json +++ b/package.json @@ -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",