chore(deps): update devdependency webpack to v5 #483
This file contains 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: build-test-deploy | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [16] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: true | |
- name: Get yarn cache directory path π | |
id: yarn-cache-dir-path | |
run: cd nuxt && echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache node_modules π¦ | |
uses: actions/[email protected] | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Setup ddev | |
uses: jonaseberle/github-action-setup-ddev@v1 | |
with: | |
autostart: false | |
- name: Start ddev | |
run: cd drupal && ddev start | |
- name: Install Drupal π¨π»βπ» | |
run: cd drupal && ddev drupal-install | |
- name: Install Nuxt.js π¨π»βπ» | |
run: cd nuxt && yarn | |
- name: Run linting π | |
run: cd nuxt && yarn lint | |
# @TODO - Add unit tests | |
# - name: Run unit tests π§ͺ | |
# run: cd nuxt && yarn test:unit | |
- name: Build dist π¨π»βπ» | |
run: cd nuxt && yarn generate | |
# @TODO - Add e2e tests | |
# - name: Run end-to-end tests π§ͺ | |
# run: cd nuxt && NODE_TLS_REJECT_UNAUTHORIZED=0 yarn test:cy | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './nuxt/dist' | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "chore(ci): deploy from GitHub Actions" | |
enable-pull-request-comment: true | |
enable-commit-comment: true | |
overwrites-pull-request-comment: true | |
github-deployment-environment: ${{ github.head_ref }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 | |
# - uses: actions/upload-artifact@v3 | |
# if: failure() | |
# with: | |
# name: cypress-screenshots | |
# path: nuxt/cypress/screenshots | |
# - uses: actions/upload-artifact@v3 | |
# if: always() | |
# with: | |
# name: cypress-videos | |
# path: nuxt/cypress/videos | |
# - uses: codecov/codecov-action@v3 | |
# with: | |
# files: ./nuxt/coverage/clover.xml | |
# name: codecov-umbrella | |
# fail_ci_if_error: true | |
# verbose: true |