diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..5a031531 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +# Name of workflow +name: Lint workflow + +# Trigger workflow on all pull requests +on: + pull_request: + branches: + - develop + - staging + +# Jobs to carry out +jobs: + test: + # Operating system to run job on + runs-on: ubuntu-latest + + # Steps in job + steps: + # Get code from repo + - name: Checkout code + uses: actions/checkout@v1 + + - name: Use Node.js 21.x + uses: actions/setup-node@v1 + with: + node-version: 21.x + + # Install dependencies + - name: 🧰 Install Deps + run: npm install + + # Run lint + - name: Run Lint + run: npm run lint + + # Run build + - name: Run Build + run: npm run build + + # Run tests + - name: Run Tests + run: npm run test + \ No newline at end of file diff --git a/src/components/Advertisement.tsx b/src/components/Advertisement.tsx index 2181f6aa..bb55bcb2 100644 --- a/src/components/Advertisement.tsx +++ b/src/components/Advertisement.tsx @@ -2,7 +2,7 @@ interface AdvertisementProps { companyName: string; productDescription: string; price: string; -}; +} function Advertisement(props: AdvertisementProps) { return ( diff --git a/src/components/Calculator.tsx b/src/components/Calculator.tsx index bfac7800..60e08ce5 100644 --- a/src/components/Calculator.tsx +++ b/src/components/Calculator.tsx @@ -4,7 +4,8 @@ interface CalculatorState { total: number; previousTotal: number; } - +//calculator function +//comment comment export default function Calculator() { const [calcState, setCalcState] = useState({ total: 0, previousTotal: 0 }); const [value, setValue] = useState(0); @@ -15,6 +16,7 @@ export default function Calculator() { return (
+

Simple Calculator

should match snapshot 1`] = ` "

Simple Calculator