Skip to content

Commit

Permalink
build: sauce labs connect initial action (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxokorokov committed Oct 12, 2023
1 parent 245c873 commit 9c9cb48
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
name: ci
on: [push, pull_request]

on:
push:
branches:
- master
- '[0-9]+_[0-9]+_x'
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest
env:
SAUCE_USERNAME: pkozlowski
SAUCE_ACCESS_KEY: c5ea8b730bc9-378b-43e4-6e34-e66aa371
BROWSER_PROVIDER_READY_FILE: /tmp/sauce-connect-ready
LOGS_DIR: /tmp/logs
steps:
- uses: actions/checkout@v3
- run: mkdir -p $LOGS_DIR && ./scripts/sauce_connect_setup.sh
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
Expand All @@ -39,8 +45,3 @@ jobs:
name: test-reports
path: test-reports
if: ${{ always() }}
- run: cat $LOGS_DIR/*
- run: ./scripts/sauce_connect_block.sh
- run: yarn saucelabs
- run: ./scripts/sauce_connect_teardown.sh
if: ${{ always() }}
30 changes: 30 additions & 0 deletions .github/workflows/saucelabs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: SauceLabs

on:
push:
branches:
- master
pull_request_target:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
saucelabs:
runs-on: ubuntu-latest
name: SauceLabs
steps:
- uses: actions/checkout@v3
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ngb-${{ github.run_number }}
- run: yarn saucelabs
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: sauce-connect-log
path: ${{ env.SAUCE_CONNECT_DIR_IN_HOST }}/sauce-connect.log

0 comments on commit 9c9cb48

Please sign in to comment.