2024-07-18 06:39:02 +01:00
|
|
|
# These are workflows used exclusively for the mystery events sub-project
|
2024-07-17 22:51:20 +01:00
|
|
|
# It's basically a copy of eslint.yml & test.yml just aimed at a different branch
|
|
|
|
|
2024-07-18 06:36:14 +01:00
|
|
|
name: MysteryEvents
|
2024-07-17 22:51:20 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
# Trigger the workflow on push or pull request,
|
|
|
|
# but only for the mystery-battle-events branch
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- mystery-battle-events # Trigger on push events to the mystery-battle-events branch
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- mystery-battle-events # Trigger on pull request events targeting the mystery-battle-events branch
|
|
|
|
|
|
|
|
jobs:
|
2024-07-18 06:38:33 +01:00
|
|
|
lint: # Define a job named "run-linters"
|
|
|
|
name: Lint # Human-readable name for the job
|
2024-07-17 22:51:20 +01:00
|
|
|
runs-on: ubuntu-latest # Specify the latest Ubuntu runner for the job
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out Git repository # Step to check out the repository
|
|
|
|
uses: actions/checkout@v2 # Use the checkout action version 2
|
|
|
|
|
|
|
|
- name: Set up Node.js # Step to set up Node.js environment
|
|
|
|
uses: actions/setup-node@v1 # Use the setup-node action version 1
|
|
|
|
with:
|
|
|
|
node-version: 20 # Specify Node.js version 20
|
|
|
|
|
|
|
|
- name: Install Node.js dependencies # Step to install Node.js dependencies
|
|
|
|
run: npm ci # Use 'npm ci' to install dependencies
|
|
|
|
|
|
|
|
- name: eslint # Step to run linters
|
|
|
|
run: npm run eslint-ci
|
2024-07-17 22:57:04 +01:00
|
|
|
|
2024-07-18 06:38:33 +01:00
|
|
|
test: # Define a job named "run-tests"
|
|
|
|
name: Test # Human-readable name for the job
|
2024-07-17 22:51:20 +01:00
|
|
|
runs-on: ubuntu-latest # Specify the latest Ubuntu runner for the job
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out Git repository # Step to check out the repository
|
|
|
|
uses: actions/checkout@v4 # Use the checkout action version 4
|
|
|
|
|
|
|
|
- name: Set up Node.js # Step to set up Node.js environment
|
|
|
|
uses: actions/setup-node@v4 # Use the setup-node action version 4
|
|
|
|
with:
|
|
|
|
node-version: 20 # Specify Node.js version 20
|
|
|
|
|
|
|
|
- name: Install Node.js dependencies # Step to install Node.js dependencies
|
|
|
|
run: npm ci # Use 'npm ci' to install dependencies
|
|
|
|
|
|
|
|
- name: tests # Step to run tests
|
2024-07-18 06:36:14 +01:00
|
|
|
run: npm run test${{ runner.debug == '0' &&':silent' }} # silent on default. if debug run loud
|