proxy test #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: proxy | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test app using Dev 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: "npm" | |
- 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 |