Update the test strategy

We now only perform one test on the oldest node version. In addition, timeout values were added and some other small tidy ups.
This commit is contained in:
Cooldude2606 committed 2026-08-30 21:50:47 +01:00
1 parent 285a0018c9
commit 384a185a2e
1 file changed
+24 -10
+24 -10
View File
@@ -7,15 +7,27 @@ on:
push: push:
pull_request: pull_request:
env:
NODE_VERSION: 24.x
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15
strategy: strategy:
fail-fast: false
matrix: matrix:
# Supported versions are active lts and maintenance see https://nodejs.org/en/about/releases/ # Supported node versions are active lts and maintenance see https://nodejs.org/en/about/releases/
node-version: [22.x, 24.x] node-version: [24.x]
# Supported versions are latest stable and one minor version before stable (even if from a previous major)
# Supported factorio versions are latest stable and one minor version before stable (even if from a previous major)
factorio-version: [1.1.110, 2.0.77, 2.1.8] factorio-version: [1.1.110, 2.0.77, 2.1.8]
# Coverage is performed on the older of the supported node versions
include:
- node-version: 22.x
factorio-version: 2.1.8
coverage: true
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -29,13 +41,13 @@ jobs:
- name: Use Factorio ${{ matrix.factorio-version }} - name: Use Factorio ${{ matrix.factorio-version }}
run: wget -q -O factorio.tar.gz https://www.factorio.com/get-download/${{ matrix.factorio-version }}/headless/linux64 && tar -xf factorio.tar.gz && rm factorio.tar.gz run: wget -q -O factorio.tar.gz https://www.factorio.com/get-download/${{ matrix.factorio-version }}/headless/linux64 && tar -xf factorio.tar.gz && rm factorio.tar.gz
- name: Run tests - name: Run tests
if: ${{ matrix.node-version != '22.x' || matrix.factorio-version != '1.1.110' }} if: ${{ !matrix.coverage }}
run: pnpm test run: pnpm test
- name: Run coverage - name: Run coverage
if: ${{ matrix.node-version == '22.x' && matrix.factorio-version == '1.1.110' }} if: ${{ matrix.coverage }}
run: pnpm run ci-cover run: pnpm run ci-cover
- name : Upload coverage to Codecov - name: Upload coverage to Codecov
if: ${{ matrix.node-version == '22.x' && matrix.factorio-version == '1.1.110' }} if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v4
with: with:
files: ./coverage/lcov.info files: ./coverage/lcov.info
@@ -69,7 +81,7 @@ jobs:
- uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 24.x node-version: ${{ env.NODE_VERSION }}
- name: Prepare and install - name: Prepare and install
run: pnpm i --no-frozen-lockfile run: pnpm i --no-frozen-lockfile
- name: Build - name: Build
@@ -83,23 +95,25 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 24.x node-version: ${{ env.NODE_VERSION }}
- run: pnpm i --no-frozen-lockfile - run: pnpm i --no-frozen-lockfile
- run: pnpm run lint - run: pnpm run lint
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 24.x node-version: ${{ env.NODE_VERSION }}
- run: pnpm i --no-frozen-lockfile - run: pnpm i --no-frozen-lockfile
- run: pnpm run build-mod - run: pnpm run build-mod
# Upload build to artifacts # Upload build to artifacts