Merge pull request #982 from Cooldude2606/ci/change-strategy

Update the test strategy
This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-08-30 23:55:49 +03:00
commit cc8f590bf4
1 file changed
+24 -10
+24 -10
View File
@@ -7,15 +7,27 @@ on:
push:
pull_request:
env:
NODE_VERSION: 24.x
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# Supported versions are active lts and maintenance see https://nodejs.org/en/about/releases/
node-version: [22.x, 24.x]
# Supported versions are latest stable and one minor version before stable (even if from a previous major)
# Supported node versions are active lts and maintenance see https://nodejs.org/en/about/releases/
node-version: [24.x]
# 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]
# Coverage is performed on the older of the supported node versions
include:
- node-version: 22.x
factorio-version: 2.1.8
coverage: true
steps:
- uses: actions/checkout@v4
@@ -29,13 +41,13 @@ jobs:
- 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
- name: Run tests
if: ${{ matrix.node-version != '22.x' || matrix.factorio-version != '1.1.110' }}
if: ${{ !matrix.coverage }}
run: pnpm test
- name: Run coverage
if: ${{ matrix.node-version == '22.x' && matrix.factorio-version == '1.1.110' }}
if: ${{ matrix.coverage }}
run: pnpm run ci-cover
- name : Upload coverage to Codecov
if: ${{ matrix.node-version == '22.x' && matrix.factorio-version == '1.1.110' }}
- name: Upload coverage to Codecov
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
@@ -69,7 +81,7 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
node-version: ${{ env.NODE_VERSION }}
- name: Prepare and install
run: pnpm i --no-frozen-lockfile
- name: Build
@@ -83,23 +95,25 @@ jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
node-version: ${{ env.NODE_VERSION }}
- run: pnpm i --no-frozen-lockfile
- run: pnpm run lint
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
node-version: ${{ env.NODE_VERSION }}
- run: pnpm i --no-frozen-lockfile
- run: pnpm run build-mod
# Upload build to artifacts