Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Config streamline

Config streamline #83

Workflow file for this run

name: 'Test'
on:
pull_request:
branches:
- main
push:
branches-ignore:
- main
workflow_call:
workflow_dispatch:
jobs:
test:
name: 'Unit Tests'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20 ]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- 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: 'Test Node.js-${{ matrix.node-version }}'
run: npm test
env:
VITE_MODE: 'TEST'
build:
name: 'Test Build'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20 ]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- 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: 'Test Build Image'
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'
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