Skip to content

Commit

Permalink
Basic GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCode92 committed Dec 11, 2024
1 parent 3f2320c commit f6dfb72
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test and Build the Application
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.1"
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.1"
- name: Install dependencies
run: npm install
- name: Build the application
run: npm run build
- name: Upload artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: dist-files
path: dist

0 comments on commit f6dfb72

Please sign in to comment.