mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
clean up tests action
This commit is contained in:
parent
c473212f2a
commit
10f02e576f
1 changed files with 34 additions and 22 deletions
56
.github/workflows/tests.yml
vendored
56
.github/workflows/tests.yml
vendored
|
|
@ -9,28 +9,40 @@ on:
|
|||
- main
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check Out Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install Dependencies, lint and Run Tests
|
||||
run: |
|
||||
echo "Installing dependencies..."
|
||||
npm ci
|
||||
echo "Running ESLint..."
|
||||
npx eslint .
|
||||
echo "Running tests..."
|
||||
npm test
|
||||
working-directory: ${{ matrix.directory }}
|
||||
|
||||
lint-and-tests:
|
||||
strategy:
|
||||
matrix:
|
||||
directory: [client, server]
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: ${{ matrix.directory }}/package-lock.json
|
||||
|
||||
- name: Process ${{ matrix.directory }}
|
||||
working-directory: ${{ matrix.directory }}
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
echo "::group::Installing dependencies for ${{ matrix.directory }}"
|
||||
npm ci
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Running ESLint"
|
||||
npx eslint . || {
|
||||
echo "ESLint failed with exit code $?"
|
||||
exit 1
|
||||
}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Running Tests"
|
||||
npm test
|
||||
echo "::endgroup::"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue