diff options
author | Matt Stratton <matt.stratton@gmail.com> | 2020-12-10 01:43:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 01:43:26 +0300 |
commit | 95b4066c3ba8ca6aa9b133bf9c66cee6e7efe292 (patch) | |
tree | 5decc80ceacd3a918c62c6b6e18d197434a2182e | |
parent | 6616bf5cdf72f2cd8bb3577c53764410476813d1 (diff) |
Test with matrix build (#321)
-rw-r--r-- | .github/workflows/ci.yml | 8 | ||||
-rw-r--r-- | test/blue-grid.js | 17 | ||||
-rw-r--r-- | test/blue-row-jumbo-false.js | 13 | ||||
-rw-r--r-- | test/blue-row-jumbo-true.js | 13 |
4 files changed, 49 insertions, 2 deletions
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 |