Skip to content

Commit

Permalink
[DEVX-1189] Test bundle against sauce on PR (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
FriggaHel authored Sep 10, 2021
1 parent c01ad0f commit 0005e17
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 893 deletions.
1 change: 0 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ jobs:
env:
SAUCE_CYPRESS_VIDEO_RECORDING: false
run: bash tests/integration/integration-tests.sh

60 changes: 50 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master

env:
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,18 +40,54 @@ jobs:
-
name: List bundle contents
run: ls -R bundle/

build-windows-bundle-and-test:
runs-on: windows-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
-
name: Bundle Directory
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Use Node.js v14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install gcloud SDK
uses: google-github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.GCS_RUNNER_SA_KEY }}
project_id: ${{ secrets.GCS_RUNNER_PROJECT_ID }}
env:
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe

- name: Update Release version
run: npm version --no-git-tag-version 1.0.0

- run: npm ci --production

- name: Bundle Directory
run: bash ./scripts/bundle.sh
-
name: List bundle contents
run: ls -R bundle/
-
name: Print npm version
run: bundle/node_modules/.bin/npm -v

- name: Archive bundle
uses: azure/powershell@v1
with:
inlineScript: |
Compress-Archive bundle/ sauce-cypress-runner.zip
azPSVersion: '3.1.0'

- name: Upload to GCS
run: |
gsutil cp ./sauce-cypress-runner.zip gs://${{ secrets.GCS_RUNNER_BUCKET }}/sauce-cypress-runner-${{ github.run_id }}.zip
- name: Test on Sauce
working-directory: ./tests/kitchen-sink-tests
run: |
npx saucectl run --config .sauce/config_on_sauce.yml --runner-version "url: https://storage.googleapis.com/${{ secrets.GCS_RUNNER_BUCKET }}/sauce-cypress-runner-${{ github.run_id }}.zip"
Loading

0 comments on commit 0005e17

Please sign in to comment.