Skip to content

Commit

Permalink
add frontend tests to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
eddimull committed Sep 2, 2024
1 parent 91b522b commit a96ed0b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/frontendTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Frontend Test

on:
push:
branches: [master, staging, dev]
pull_request:
branches: [master, staging, dev]

jobs:
laravel-npm-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, json, mbstring, pdo

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22.7.0"

- name: Install specific npm version
run: npm install -g npm@10.8.2

- name: Install NPM dependencies
run: npm ci

- name: Run tests
run: npm run test:pipeline
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"dev": "vite",
"test": "vitest",
"test:pipeline": "vitest run --mode=pipeline",
"build": "vite build"
},
"devDependencies": {
Expand Down Expand Up @@ -64,4 +65,4 @@
"vue3-timepicker": "*",
"vuex": "^4.0.2"
}
}
}

0 comments on commit a96ed0b

Please sign in to comment.