Skip to content

Commit

Permalink
chore: use circle
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasholzer committed Aug 9, 2024
1 parent 56fe4ce commit d161a8c
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ workflows:
'Test & Check 🕵️‍♀️':
jobs:
- formatting
- e2e-tests:
context: [shared-secrets]

executors:
node:
Expand Down Expand Up @@ -121,3 +123,65 @@ jobs:
- npm-install-deps
- run: npm run format:ci
- run: npm run lint:ci

e2e-tests:
docker:
- image: cimg/node:22.5.1
steps:
- checkout
- run: npm install -g @netlify/[email protected]
- run:
name: Create Remlink Config
command: node ./tools/create-remlink.config.js
environment:
BRANCH: << pipeline.git.branch >>
- run:
name: Trigger Netlify E2E image build and extract values
command: |
cat ./remlink.config.json
output=$(netlify-e2e build-image ./remlink.config.json)
pipelineId=$(echo $output | jq -r '.pipelineId')
testImageTag=$(echo $output | jq -r '.tag')
workingDir="$(npm root -g)/@netlify/e2e"
echo "export pipelineId=$pipelineId" >> $BASH_ENV
echo "export testImageTag=$testImageTag" >> $BASH_ENV
echo "export workingDir=$workingDir" >> $BASH_ENV
source $BASH_ENV
- run:
name: Echo extracted values
command: |
echo "The extracted pipelineId is: $pipelineId"
echo "The extracted Tag is: $testImageTag"
echo "The working directory is: $workingDir"
ls -lah "$workingDir"
- run:
name: Run playwright
command: |
ls -lah
working_directory: $workingDir
# - name: Authenticate with private NPM package
# run: |
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_READ_ONLY_TOKEN }}" > /home/runner/work/_temp/.npmrc
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_READ_ONLY_TOKEN }}" > .npmrc
# - name: Install Netlify E2E
# run: npm install -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 }}"

# - name: Save npm logs on failure
# if: failure() # This step only runs if the previous steps failed
# uses: actions/upload-artifact@v4
# with:
# name: npm-logs
# path: /home/runner/.npm/_logs

0 comments on commit d161a8c

Please sign in to comment.