From 967f067082c9220024f7c72fe827bcbbae7a9f85 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 14 Apr 2024 11:06:20 +0200 Subject: Test latest known Hugo version --- .github/workflows/codeql-analysis.yml | 10 ++-------- .github/workflows/cs.yml | 10 ++-------- .github/workflows/playwright.yml | 27 +++++++++++++++++---------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c23e5a2..93a77ef 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -62,14 +62,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20.x' - - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: 'npm' + cache-dependency-path: '**/package-lock.json' - name: Install a project with a clean slate run: npm ci --ignore-scripts diff --git a/.github/workflows/cs.yml b/.github/workflows/cs.yml index e90e993..a59baca 100644 --- a/.github/workflows/cs.yml +++ b/.github/workflows/cs.yml @@ -25,14 +25,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20.x' - - - name: Setup npm cache - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: 'npm' + cache-dependency-path: '**/package-lock.json' - name: Install npm dependencies run: npm ci --ignore-scripts diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 08fd767..98d1235 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -14,29 +14,36 @@ on: jobs: test: - name: Run tests + name: Run tests for Hugo ${{ matrix.hugo-version }} runs-on: ubuntu-latest # The maximum number of minutes to let a workflow run # before GitHub automatically cancels it. Default: 360 timeout-minutes: 30 + strategy: + # When set to true, GitHub cancels + # all in-progress jobs if any matrix job fails. + fail-fast: false + + matrix: + hugo-version: + - '0.114.0' + - latest + steps: - name: Checkout code uses: actions/checkout@v4 + with: + # Fetch all history for .GitInfo and .Lastmod + fetch-depth: 0 - name: Set up Node 20.x uses: actions/setup-node@v4 with: node-version: '20.x' - - - name: Setup npm cache - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: 'npm' + cache-dependency-path: '**/package-lock.json' - name: Install npm dependencies run: npm ci --ignore-scripts @@ -47,7 +54,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v3 with: - hugo-version: '0.114.0' + hugo-version: ${{ matrix.hugo-version }} extended: true - name: Run Playwright tests -- cgit v1.2.3