From 9f07fed737866df13cd954b6f7482eceea521c78 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 17 Mar 2023 09:09:27 +0200 Subject: [PATCH] Update CI (#127) * print hugo version for the extended tests since older npm needs a different syntax * test on all supported versions * use Node.js 18 for publish too --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25419be..0ca379d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,11 @@ on: env: FORCE_COLOR: 2 - NODE_LINT: 18 + NODE_LTS: 18 # used for linting and publish jobs: lint: + name: Lint runs-on: ubuntu-latest steps: @@ -22,7 +23,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: "${{ env.NODE_LINT }}" + node-version: ${{ env.NODE_LTS }} cache: npm - name: Install npm dependencies @@ -38,13 +39,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest, windows-latest] node: [12, 14, 16, 18] - include: - - os: windows-latest - node: 18 - - os: macos-latest - node: 18 steps: - name: Clone repository @@ -91,10 +87,14 @@ jobs: - name: Install npm dependencies run: npm ci + - name: Print hugo version + run: npm exec hugo version + - name: Run tests run: npm run uvu publish: + name: Publish on npm if: github.repository == 'fenneclab/hugo-bin' && startsWith(github.ref, 'refs/tags/') needs: [lint, test, test-extended] runs-on: ubuntu-latest @@ -107,7 +107,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: ${{ env.NODE_LTS }} registry-url: 'https://registry.npmjs.org' - name: Publish on npm