Skip to content

Commit

Permalink
Merge pull request #7 from carlosferreyra/add-github-workflows
Browse files Browse the repository at this point in the history
Add GitHub workflows for deployment and unit tests
  • Loading branch information
carlosferreyra authored Dec 12, 2024
2 parents cb9fc7d + b1c3576 commit 5ec5684
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 0 deletions.
32 changes: 32 additions & 0 deletions backend/.github/workflows/backend-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Backend

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

- name: Deploy
if: success()
run: echo "Deploying backend..."
28 changes: 28 additions & 0 deletions backend/.github/workflows/backend-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Backend

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test
32 changes: 32 additions & 0 deletions frontend/.github/workflows/frontend-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Frontend

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

- name: Deploy
if: success()
run: echo "Deploying frontend..."
28 changes: 28 additions & 0 deletions frontend/.github/workflows/frontend-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Frontend

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

0 comments on commit 5ec5684

Please sign in to comment.