clean up tests action

This commit is contained in:
C. Fuhrman 2025-02-02 15:31:16 -05:00
parent c473212f2a
commit 10f02e576f

View file

@ -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::"