Skip to content

Commit

Permalink
chore: create test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasholzer committed Aug 9, 2024
1 parent 377b2ae commit 3659dc1
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Netlify E2E Tests

on: push

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Install Netlify E2E
run: npm i -g @netlify/[email protected]
- name: Create Remlink Config
run: node ./tools/create-remlink.config.js
- name: Trigger Netlify E2E image build
id: extract-deploy-id
run: |
output=$(netlify-e2e build-image ./remlink.config.json)
echo "pipelineId=$(echo "output" | jq -r '.pipelineId')" >> $GITHUB_ENV
echo "testImageTag=$(echo "output" | jq -r '.tag')" >> $GITHUB_ENV
- name: Echo extracted values
run: |
echo "The extracted pipelineId is: ${{ env.pipelineId }}"
echo "The extracted Tag is: ${{ env.testImageTag }}"
19 changes: 19 additions & 0 deletions tools/create-remlink.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { writeFile } from 'node:fs/promises'

const config = {
links: [
{
repo: 'netlify/build',
branch: 'feat/test-mocked-versions',
packages: {
'@netlify/config': 'packages/config',
'@netlify/build': 'packages/build',
'@netlify/zip-it-and-ship-it': 'packages/zip-it-and-ship-it',
'@netlify/build-info': 'packages/build-info',
},
installCommands: ['npm run build'],
},
],
}

await writeFile('remlink.config.json', JSON.stringify(config), 'utf-8')

0 comments on commit 3659dc1

Please sign in to comment.