From 9465a488ccd032a7bc4ffb186d0890114aff2849 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 26 Mar 2022 21:23:19 +0100 Subject: [PATCH] Migrate coverage reporting to GitHub Actions (#454) Travis seems to be going away from supporting Open Source Software for free and their proceedure to gaining free tokens is getting harder and hander to find for each year that passes. Remove Travis CI integration and migrate the coverage reporting previously provided by the Travis build over to the GitHub Actions. --- .github/workflows/node.js.yml | 12 +++++++++++- .travis.yml | 15 --------------- docs/contributing.md | 4 ++-- 3 files changed, 13 insertions(+), 18 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 15abaaaa..2f3e4e50 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -25,7 +25,17 @@ jobs: - run: wget -q -O factorio.tar.gz https://www.factorio.com/get-download/latest/headless/linux64 && tar -xf factorio.tar.gz && rm factorio.tar.gz - run: npx lerna bootstrap --hoist - run: npx lerna run build - - run: npm test + - name: Run tests + if: ${{ matrix.node-version != '12.x' }} + run: npm test + - name: Run coverage + if: ${{ matrix.node-version == '12.x' }} + run: npm run ci-cover + - name : Upload coverage to Codecov + if: ${{ matrix.node-version == '12.x' }} + uses: codecov/codecov-action@v2 + with: + files: ./coverage/lcov.info lint: runs-on: ubuntu-latest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bda06fa0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - 12 -before_install: - - curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 - - tar -xf factorio.tar.gz - - npm install -g codecov -script: - - npx lerna bootstrap --hoist --no-ci - - node packages/lib/build_mod --source-dir packages/slave/lua/clusterio_lib --output-dir temp/test/sharedMods - - curl -o temp/test/sharedMods/subspace_storage_1.99.8.zip -L https://github.com/clusterio/subspace_storage/releases/download/1.99.6/subspace_storage_1.99.8.zip - - npx lerna run build - - npm run-script ci-cover - - codecov -f coverage/lcov.info - - npm run-script lint diff --git a/docs/contributing.md b/docs/contributing.md index df8bfb8b..62eeeb5f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -183,11 +183,11 @@ The format of this log should be self explanatory, please follow it carefully. ## Supported Node.js and Factorio Versions Clusterio run on Node.js v12 and up, make sure to check that the Node builtin API's and npm packages you use are supported on these versions. -The Travis CI tests are runned on whatever version of Node.js v12 is the default. +The GitHub Actions tests are run on whatever version of Node.js v12, v14, and v16 is the default. For Factorio Clusterio 2.0 aims to support version 0.17.69 and up, including the latest experimental release. It's recommended that you use the lua API reference for 0.17.69, as there's no information on what version Factorio API's were introduced in. -The Travis CI tests are runned against latest experimental release. +The GitHub Actions tests are run against the latest experimental release. ## Code Style