chore(deps): update dependency drupal/core-composer-scaffold to v11 #437
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: test-preview | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
test_preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/setup-node@v3.5.1 | |
with: | |
node-version: 16 | |
check-latest: true | |
- name: Update npm π | |
run: | | |
npm install -g npm | |
npm --version | |
- name: Cache node_modules π¦ | |
uses: actions/cache@v3.0.11 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install frontend dependencies π¨π»βπ» | |
run: cd nuxt && npm install | |
- name: Lint code π | |
run: cd nuxt && npm run lint | |
- name: Create .env π¨π»βπ» | |
run: cp .env.example .env | |
- 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: Run unit tests π§ͺ | |
run: cd nuxt && npm run test:unit | |
- name: Generate dist π¨π»βπ» | |
run: cd nuxt && NUXT_TARGET=static NUXT_TELEMETRY_DISABLED=1 npm run generate | |
- name: Run end-to-end tests π§ͺ | |
run: cd nuxt && npm run test:e2e | |
- name: Deploy to Netlify | |
uses: nwtgck/actions-netlify@v1.2 | |
with: | |
publish-dir: './nuxt/dist' | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "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 | |
with: | |
name: cypress-videos | |
path: nuxt/cypress/videos | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: nuxt/cypress/screenshots | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./nuxt/coverage/clover.xml | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
verbose: true |