Skip to content

Commit

Permalink
Merge pull request #133 from djeck1432/feat/add-new-workflow-for-runn…
Browse files Browse the repository at this point in the history
…ing-fe-tests

Feat/add new workflow for running fe tests
  • Loading branch information
djeck1432 authored Oct 28, 2024
2 parents e243ab7 + b857bc5 commit a3cacae
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/frontend_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Frontend Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Create .env file
run: cp .env.dev .env
working-directory: frontend

- name: Install dependencies
run: yarn install
working-directory: frontend

- name: Run tests
run: yarn test
working-directory: frontend
3 changes: 3 additions & 0 deletions frontend/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ FROM node:20-alpine AS build
WORKDIR /app
COPY . /app

COPY .env.dev .env

RUN yarn
RUN yarn test
RUN yarn build

# Stage 2: Set up Nginx to serve the built app
Expand Down

0 comments on commit a3cacae

Please sign in to comment.