Add GoogleTagManager support (#201) #214
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test and Build | |
| on: push | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| cache-hit: ${{ steps.cache-deps.outputs.cache-hit }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "16" | |
| - name: Cache Node Modules | |
| id: cache-deps | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install Dependencies | |
| run: npm install | |
| test: | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "16" | |
| - name: Restore Node Modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install Dependencies (if needed) | |
| run: npm install | |
| - name: Unit Testing | |
| run: npm run test:ci | |
| build: | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'canopy-iiif/canopy-iiif' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "16" | |
| - name: Restore Node Modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install Dependencies (if needed) | |
| run: npm install | |
| - name: 2.x Collection (Aggregation) | |
| run: npm run prebuild -- --path=./config/.fixtures/canopy.presentation-2.json | |
| - name: 2.x Collection (Build) | |
| run: npm run test-build | |
| - name: 3.0 Collection (Aggregation) | |
| run: npm run prebuild -- --path=./config/.fixtures/canopy.presentation-3.json | |
| - name: 3.0 Collection (Build) | |
| run: npm run test-build | |
| - name: Arabic Language (Aggregation) | |
| run: npm run prebuild -- --path=./config/.fixtures/canopy.arabic.json | |
| - name: Arabic Language (Build) | |
| run: npm run test-build | |
| - name: Customize Search (Aggregation) | |
| run: npm run prebuild -- --path=./config/.fixtures/canopy.customize-search.json | |
| - name: Customize Search (Build) | |
| run: npm run test-build | |
| - name: Minimal Configuration (Aggregation) | |
| run: npm run prebuild -- --path=./config/.fixtures/canopy.minimal.json | |
| - name: Minimal Configuration (Build) | |
| run: npm run test-build |