Skip to content

Eslint config 9.0 migration #222

Eslint config 9.0 migration

Eslint config 9.0 migration #222

Workflow file for this run

name: 'Tests'
# This workflow is responsible for running the Haztrak react client tests.
on:
pull_request:
branches: ['main']
push:
branches-ignore: ['main']
workflow_call:
jobs:
run_unit_tests:
name: 'Unit Tests'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Setup Node'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: 'Install Dependencies'
run: npm ci
- name: 'Test Node.js-${{ matrix.node-version }}'
run: npm test
env:
VITE_MODE: 'TEST'
test_npm_build:
name: 'NPM Build'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup Node'
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: 'Install Dependencies'
run: npm ci
- name: 'Build'
run: npm run build
test_image_builds:
name: 'Image Builds'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Docker meta'
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/the-manifest-game
- name: 'Build and push'
uses: docker/build-push-action@v3
with:
platforms: linux/amd64
context: .
push: false
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
lint:
name: 'Lint'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup Node'
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: 'Install Dependencies'
run: npm ci
- name: 'Lint Source'
run: npm run lint