Skip to content

Commit

Permalink
Updated GitHub workflow to be multi steps
Browse files Browse the repository at this point in the history
  • Loading branch information
the-vis-sharma committed Feb 13, 2022
1 parent 8f9a394 commit 75fb7f9
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 114 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
name: Deploy to Firebase
'on':
push:
branches:
Expand All @@ -10,11 +7,23 @@ jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: >-
npm ci && npm run lint && npm run prettier && npm run stylelint && npm run
test:coverage && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
- name: Checkout
uses: actions/checkout@v2

- name: Install Dependencies
run: npm ci

- name: Lint Checks
run: npm run lint && npm run prettier && npm run stylelint

- name: Unit Tests
run: npm run test:coverage

- name: Build
run: npm run build

- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_THE_VIS_SHARMA }}'
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/firebase-hosting-pull-request.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/8ce17763-366b-4f26-af3d-428a928f882b/deploy-status)](https://app.netlify.com/sites/the-vis-sharma/deploys)
![Deploy to Firebase Hosting on merge](https://github.com/the-vis-sharma/my-portfolio/actions/workflows/firebase-hosting-merge.yml/badge.svg)

# Vishnu's Portfolio

Expand Down
99 changes: 50 additions & 49 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,55 @@
module.exports = {
roots: ["<rootDir>/src"],
setupFilesAfterEnv: ["<rootDir>/jest-config/setupTests.ts"],
testMatch: [
"**/__specs__/**/*.+(ts|tsx|js|jsx)",
"**/?(*.)+(spec|test).+(ts|tsx|js|jsx)",
],
moduleNameMapper: {
"\\.(css|less|sass|scss)$": "<rootDir>/jest-config/__mocks__/styleMock.js",
"\\.(gif|ttf|eot|svg|jpg|jpeg|png|ico|webp)$":
"<rootDir>/jest-config/__mocks__/fileMock.js",
},
transformIgnorePatterns: ["node_modules", "dist"],
preset: "ts-jest",
testEnvironment: "jsdom",
transform: {
"^.+\\.(ts|tsx)?$": "ts-jest",
"^.+\\.(js|jsx)$": "babel-jest",
},
reporters: [
"default",
[
"jest-junit",
{
outputDirectory: "./coverage/junit",
outputName: "junit.xml",
},
roots: ["<rootDir>/src"],
setupFilesAfterEnv: ["<rootDir>/jest-config/setupTests.ts"],
testMatch: [
"**/__specs__/**/*.+(ts|tsx|js|jsx)",
"**/?(*.)+(spec|test).+(ts|tsx|js|jsx)",
],
[
"jest-html-reporters",
{
publicPath: "./coverage/html-report",
filename: "report.html",
},
moduleNameMapper: {
"\\.(css|less|sass|scss)$": "<rootDir>/jest-config/__mocks__/styleMock.js",
"\\.(gif|ttf|eot|svg|jpg|jpeg|png|ico|webp)$":
"<rootDir>/jest-config/__mocks__/fileMock.js",
},
transformIgnorePatterns: ["node_modules", "dist"],
preset: "ts-jest",
testEnvironment: "jsdom",
transform: {
"^.+\\.(ts|tsx)?$": "ts-jest",
"^.+\\.(js|jsx)$": "babel-jest",
},
reporters: [
"default",
[
"jest-junit",
{
outputDirectory: "./coverage/junit",
outputName: "junit.xml",
},
],
[
"jest-html-reporters",
{
publicPath: "./coverage/html-report",
filename: "report.html",
},
],
],
collectCoverageFrom: [
"src/**/*.{js,ts,jsx,tsx}",
"!src/**/index.{ts,tsx}",
"!src/reportWebVitals.ts",
"!src/react-app-env.d.ts",
"!src/service-worker.ts",
"!src/serviceWorkerRegistration.ts",
"!src/firebase-util.ts"
],
],
collectCoverageFrom: [
"src/**/*.{js,ts,jsx,tsx}",
"!src/**/index.{ts,tsx}",
"!src/reportWebVitals.ts",
"!src/react-app-env.d.ts",
"!src/service-worker.ts",
"!src/serviceWorkerRegistration.ts",
],
coverageReporters: ["json", "lcov", "text", "clover", "cobertura"],
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
coverageReporters: ["json", "lcov", "text", "clover", "cobertura"],
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
},
},
},
};
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vishnu-portfolio",
"description": "This is portfolio website created by Vishnu Bochiwal using ReactJS and MUI",
"repository": "https://github.com/the-vis-sharma/my-portfolio",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"dependencies": {
"@emotion/react": "^11.7.1",
Expand Down
40 changes: 20 additions & 20 deletions src/components/app/__specs__/__snapshots__/App.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
<p
class="MuiTypography-root MuiTypography-body2 css-1chm2gf-MuiTypography-root"
>
Working at Device OS team
Working on Next Big Thing
</p>
</li>
</ul>
Expand Down Expand Up @@ -1103,7 +1103,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Paisa Vasool
Expand Down Expand Up @@ -1156,7 +1156,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
U-Move: Bike Rental App
Expand Down Expand Up @@ -1209,7 +1209,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Smart Queuing System
Expand Down Expand Up @@ -1262,7 +1262,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
People Counter App
Expand Down Expand Up @@ -1315,7 +1315,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Status Downloader for WhatsApp
Expand Down Expand Up @@ -1368,7 +1368,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
DP & Videos Downloader
Expand Down Expand Up @@ -1421,7 +1421,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Red Basket - Groceries Shopping App
Expand Down Expand Up @@ -1474,7 +1474,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Fuel Trades
Expand Down Expand Up @@ -3720,7 +3720,7 @@ exports[`should verify the snapshot for dark mode 1`] = `
<p
class="MuiTypography-root MuiTypography-body2 css-1xr3kop-MuiTypography-root"
>
© 2022 Vishnu Bochiwal | All Right Reserved |  v1.2.0
© 2022 Vishnu Bochiwal | All Right Reserved |  v1.2.1
</p>
</div>
</div>
Expand Down Expand Up @@ -4192,7 +4192,7 @@ exports[`should verify the snapshot for light mode 1`] = `
<p
class="MuiTypography-root MuiTypography-body2 css-1chm2gf-MuiTypography-root"
>
Working at Device OS team
Working on Next Big Thing
</p>
</li>
</ul>
Expand Down Expand Up @@ -4626,7 +4626,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Paisa Vasool
Expand Down Expand Up @@ -4679,7 +4679,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
U-Move: Bike Rental App
Expand Down Expand Up @@ -4732,7 +4732,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Smart Queuing System
Expand Down Expand Up @@ -4785,7 +4785,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
People Counter App
Expand Down Expand Up @@ -4838,7 +4838,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Status Downloader for WhatsApp
Expand Down Expand Up @@ -4891,7 +4891,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
DP & Videos Downloader
Expand Down Expand Up @@ -4944,7 +4944,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Red Basket - Groceries Shopping App
Expand Down Expand Up @@ -4997,7 +4997,7 @@ exports[`should verify the snapshot for light mode 1`] = `
class="MuiCardContent-root css-46bh2p-MuiCardContent-root"
>
<div
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-ooypt7-MuiTypography-root"
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-1evdgmm-MuiTypography-root"
data-testid="project-title"
>
Fuel Trades
Expand Down Expand Up @@ -7243,7 +7243,7 @@ exports[`should verify the snapshot for light mode 1`] = `
<p
class="MuiTypography-root MuiTypography-body2 css-1xr3kop-MuiTypography-root"
>
© 2022 Vishnu Bochiwal | All Right Reserved |  v1.2.0
© 2022 Vishnu Bochiwal | All Right Reserved |  v1.2.1
</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ exports[`test experiences component verify snapshot for larger display 1`] = `
<p
class="MuiTypography-root MuiTypography-body2 css-1ip9kmw-MuiTypography-root"
>
Working at Device OS team
Working on Next Big Thing
</p>
</li>
</ul>
Expand Down Expand Up @@ -459,7 +459,7 @@ exports[`test experiences component verify snapshot for tablet or lesser size di
<p
class="MuiTypography-root MuiTypography-body2 css-1ip9kmw-MuiTypography-root"
>
Working at Device OS team
Working on Next Big Thing
</p>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/components/experiences/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const companies: Company[] = [
location: "Bangalore, IN",
description:
"Amazon.com, Inc. is an American multinational technology company which focuses on e-commerce, cloud computing, digital streaming, and artificial intelligence. It is one of the Big Five companies in the U.S. information technology industry, along with Google, Apple, Meta, and Microsoft.",
accomplishments: ["Working at Device OS team"],
accomplishments: ["Working on Next Big Thing"],
duration: "Jan 2022 - Present",
},
{
Expand Down
Loading

0 comments on commit 75fb7f9

Please sign in to comment.