From 95b4066c3ba8ca6aa9b133bf9c66cee6e7efe292 Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Wed, 9 Dec 2020 16:43:26 -0600 Subject: Test with matrix build (#321) --- .github/workflows/ci.yml | 8 ++++++-- test/blue-grid.js | 17 +++++++++++++++++ test/blue-row-jumbo-false.js | 13 +++++++++++++ test/blue-row-jumbo-true.js | 13 +++++++++++++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 test/blue-grid.js create mode 100644 test/blue-row-jumbo-false.js create mode 100644 test/blue-row-jumbo-true.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1696c1f..eb6cbe9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,9 @@ jobs: lhci: name: Lighthouse runs-on: ubuntu-latest + strategy: + matrix: + castanet-config: [blue-grid,blue-row-jumbo-false,blue-row-jumbo-true] steps: - uses: actions/checkout@v2 with: @@ -24,6 +27,7 @@ jobs: - name: run Lighthouse CI run: | npm install -g @lhci/cli@0.6.x - lhci autorun + lhci autorun --config=./test/$CASTANET_CONFIG.js env: - LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} \ No newline at end of file + LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} + CASTANET_CONFIG: ${{ matrix.castanet-config }} \ No newline at end of file diff --git a/test/blue-grid.js b/test/blue-grid.js new file mode 100644 index 0000000..8c95265 --- /dev/null +++ b/test/blue-grid.js @@ -0,0 +1,17 @@ +module.exports = { + ci: { + collect: { + url: [ + 'http://localhost:1313/', + 'http://localhost:1313/aug/', + 'http://localhost:1313/guest/', + 'http://localhost:1313/about/' + ], + startServerCommand: 'cd exampleSite && HUGO_ENV=production && hugo server --config ../test/blue-grid-config.toml --baseUrl="http://localhost:1313"', + startServerReadyPattern: 'Web Server is available' + }, + upload: { + target: 'temporary-public-storage', + }, + }, +}; \ No newline at end of file diff --git a/test/blue-row-jumbo-false.js b/test/blue-row-jumbo-false.js new file mode 100644 index 0000000..9e400d7 --- /dev/null +++ b/test/blue-row-jumbo-false.js @@ -0,0 +1,13 @@ +module.exports = { + ci: { + collect: { + url: [ + 'http://localhost:1313/' + ], + startServerCommand: 'cd exampleSite && HUGO_ENV=production && hugo server --config ../test/blue-row-jumbo-false-config.toml --baseUrl="http://localhost:1313"', + }, + upload: { + target: 'temporary-public-storage', + }, + }, +}; \ No newline at end of file diff --git a/test/blue-row-jumbo-true.js b/test/blue-row-jumbo-true.js new file mode 100644 index 0000000..e564a2d --- /dev/null +++ b/test/blue-row-jumbo-true.js @@ -0,0 +1,13 @@ +module.exports = { + ci: { + collect: { + url: [ + 'http://localhost:1313/' + ], + startServerCommand: 'cd exampleSite && HUGO_ENV=production && hugo server --config ../test/blue-row-jumbo-true-config.toml --baseUrl="http://localhost:1313"', + }, + upload: { + target: 'temporary-public-storage', + }, + }, +}; \ No newline at end of file -- cgit v1.2.3