From 47632b00b8cdfe89d6a8f9d6c56a20f295e95469 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 2 Nov 2020 14:25:26 +0000 Subject: [PATCH] Ensure that theme assets can be built --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e5b29f..d054031 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,37 @@ jobs: - name: Verify the home page has the site name in it run: curl -s http://localhost:8000 | grep "Oliver Davies" + theme: + name: Build the theme assets + + runs-on: ubuntu-latest + + strategy: + matrix: + theme-path: + - web/themes/custom/opdavies + + steps: + - name: Checkout the code + uses: actions/checkout@a81bbbf + + - name: Setup node and npm + uses: actions/setup-node@56899e0 + with: + node-version: 12 + + - name: Cache npm dependencies + uses: actions/cache@d974700 + with: + path: node_modules + key: dependencies-npm-${{ hashFiles('package.json') }} + + - name: Build the production theme assets + run: | + cd ${{ matrix.theme-path }} + npm clean-install + npm run production + phpunit: runs-on: ubuntu-latest