Skip to content

Commit

Permalink
Merge pull request #84 from EddieEldridge/feature/#54/add-basic-CICD
Browse files Browse the repository at this point in the history
#54: Add basic CI/CD for projects
  • Loading branch information
gitfrosh committed Dec 2, 2022
2 parents cfce663 + d02b0bc commit 467cd12
Show file tree
Hide file tree
Showing 3 changed files with 10,492 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
custom:
- "https://www.buymeacoffee.com/SqYKLmJ7Z"
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test and Build

on:
push:
pull_request:

jobs:
test-and-build:
runs-on: ubuntu-latest

# Define Node versions to run CI/CD on
strategy:
matrix:
node-version: [14.x, 15.x]

steps:
# Checkout project
- uses: actions/checkout@v3

# Setup Node
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

# BACKEND #
# Install Packages
- name: Install Dependencies
working-directory: ./backend
run: npm ci

# Run Jest tests
- name: Run Tests
working-directory: ./backend
run: npm run test

# FRONTEND #
# Install Packages
- name: Install Dependencies
working-directory: ./frontend
run: npm ci

# Run react-scripts tests
# Note: There are currently no tests
# - name: Install Dependencies
# working-directory: ./frontend
# run: npm run test

# SAMPLE-APP #
# Install Packages
- name: Install Dependencies
working-directory: ./sample-app
run: npm ci

# Run Jest tests
- name: Run Build
working-directory: ./sample-app
run: npm run build

0 comments on commit 467cd12

Please sign in to comment.