Skip to content

Run Script With Proxy #11

Run Script With Proxy

Run Script With Proxy #11

Workflow file for this run

name: Run Script With Proxy
on:
push:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
run:
name: Run Script With Proxy
timeout-minutes: 60
runs-on: ubuntu-latest
env:
LOG_FILE: devproxy.log
DEVPROXY_VERSION: v0.18.0
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "yarn"
- name: Install dependencies
run: yarn
#################################
# Cache + install of Playwright #
#################################
- name: Store Playwright's Version
run: |
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
- name: Cache Playwright Browsers for Playwright's Version
id: cache-playwright
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-ubuntu-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
################################
# Cache + install of Dev Proxy #
################################
- name: Cache Dev Proxy
id: cache-devproxy
uses: actions/cache@v4
with:
path: ./devproxy
key: devproxy-ubuntu-${{ env.DEVPROXY_VERSION }}
- name: Install Dev Proxy
if: steps.cache-devproxy.outputs.cache-hit != 'true'
run: bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)" -- ${{ env.DEVPROXY_VERSION }}
- name: Run
timeout-minutes: 45
run: yarn start
- name: Push
run: |
if [[ ! -z $(git status -s) ]]; then
git config --global user.email "guilhermeasn@yahoo.com.br"
git config --global user.name "Guilherme Neves"
git add .
git commit -am 'Continuous Integration'
git push
fi