Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

chore(main): release 9.26.2 #384

chore(main): release 9.26.2

chore(main): release 9.26.2 #384

name: Integration test
on:
pull_request:
branches: [main]
# Run on release PRs only, or changes to this same file
paths: ['CHANGELOG.md', '.github/workflows/integration-tests.yml']
jobs:
integration:
runs-on: ubuntu-latest
steps:
- name: Checking out zip-it-and-ship-it
uses: actions/checkout@v4
with:
path: zip-it-and-ship-it
- name: Checking out test site
uses: actions/checkout@v4
with:
repository: netlify/next-runtime
path: test-site
- name: Checking out netlify-cli
uses: actions/checkout@v4
with:
repository: netlify/cli
path: netlify-cli
- name: Installing Node.js
uses: actions/setup-node@v3
with:
node-version: '*'
cache: 'npm'
# We need to add each of the lockfile paths so that the global npm cache is populated accordingly
cache-dependency-path: |
zip-it-and-ship-it/package-lock.json
test-site/package-lock.json
netlify-cli/package-lock.json
- name: Setup Deno
uses: denoland/setup-deno@v1
- name: Installing netlify-cli
run: npm ci
working-directory: netlify-cli
- name: Installing test site
run: npm install
working-directory: test-site
- name: Symlinking zip-it-and-ship-it (1/2)
run:
rm -rf $GITHUB_WORKSPACE/netlify-cli/node_modules/@netlify/zip-it-and-ship-it && mkdir -p
$GITHUB_WORKSPACE/netlify-cli/node_modules/@netlify && ln -s $GITHUB_WORKSPACE/zip-it-and-ship-it
$GITHUB_WORKSPACE/netlify-cli/node_modules/@netlify/zip-it-and-ship-it
- name: Symlinking zip-it-and-ship-it (2/2)
run:
rm -rf $GITHUB_WORKSPACE/netlify-cli/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it &&
mkdir -p $GITHUB_WORKSPACE/netlify-cli/node_modules/@netlify/build/node_modules/@netlify && ln -s
$GITHUB_WORKSPACE/zip-it-and-ship-it
$GITHUB_WORKSPACE/netlify-cli/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it
- name: Installing zip-it-and-ship-it
run: npm install && npm run build
working-directory: zip-it-and-ship-it
- name: Building and deploying site
run:
$GITHUB_WORKSPACE/netlify-cli/bin/run.mjs deploy --build --json --site ${{ secrets.NETLIFY_SITE_ID }} --auth
${{ secrets.NETLIFY_TOKEN }} --cwd demos/default --functions .netlify/functions > .netlify-deploy-log.json
working-directory: test-site
- name: Parsing deploy result
run: |
cat ./.netlify-deploy-log.json
node -e "console.log('deploy_log_url=' + require('./.netlify-deploy-log.json').logs)" >> $GITHUB_ENV
node -e "console.log('deploy_url=' + require('./.netlify-deploy-log.json').deploy_url)" >> $GITHUB_ENVrun: node scripts/parse_deploy_result.mjs ./.netlify-deploy-log.json >> $GITHUB_ENV
working-directory: test-site
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: test-site
browser: chrome
record: true
parallel: true
config-file: cypress/config/ci.config.ts
group: 'ZISI Integration Test - Next'
spec: cypress/e2e/default/*
env:
DEBUG: '@cypress/github-action'
CYPRESS_baseUrl: ${{ env.deploy_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## Integration Test: netlify/next-runtime'
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Integration Test: netlify/next-runtime
✅ Cypress tests passed
- **Deploy URL**: ${{ env.deploy_url }}
- **Deploy logs**: ${{ env.deploy_log_url }}
edit-mode: replace