Skip to content

Commit

Permalink
Merge pull request #247 from OasisDEX/refinance-github-action
Browse files Browse the repository at this point in the history
Adding 'Refinance' GitHub action
  • Loading branch information
juan-langa authored May 7, 2024
2 parents 65152eb + 405f73a commit 5f18fb0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/refinance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Refinance

on:
schedule:
- cron: '0 1 * * 1-5'

jobs:
with-wallet-refinance:
name: 'With wallet - Refinance'
runs-on: ubuntu-latest
env:
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}
container:
image: synthetixio/docker-node:18.16-ubuntu
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn
- name: Install playwright
run: npx playwright install && npx playwright install-deps
- name: Install xvfb
run: apt-get update -y && apt-get -y install xvfb && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
- name: Run With wallet Aave Ethereum tests
run: |
TENDERLY_PROJECT=${{ secrets.TENDERLY_PROJECT }} \
TENDERLY_USER=${{ secrets.TENDERLY_USER }} \
TENDERLY_ACCESS_KEY=${{ secrets.TENDERLY_ACCESS_KEY }} \
yarn ci:with-wallet:refinance
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report-with-wallet-refinance
path: playwright-reports/with-wallet-refinance
retention-days: 30

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
"//-4b": "---------- PORTFOLIO (Staging vs Production) TESTS ------------",
"//-4c": "---------------------------------------------------------------",
"portfolio:staging-vs-production": "WORKERS='3' FULLY_PARALLEL='true' RETRIES='2' yarn no-wallet:portfolio",
"//-5a": "---------------------------------------------------------------",
"//-5b": "---------- REFINANCE TESTS ------------",
"//-5c": "---------------------------------------------------------------",
"with-wallet:refinance": "REPORT_FOLDER=with-wallet-refinance npx playwright test --grep @refinance --workers=1",
"ci:with-wallet:refinance": "RETRIES='2' xvfb-run yarn with-wallet:refinance",
"//-9a": "---------------------------------------------------------------",
"//-9b": "---------------------- REPORTS --------------------------------",
"//-9c": "---------------------------------------------------------------",
Expand All @@ -102,6 +107,7 @@
"test:report:with-wallet:ajna:optimism": "npx playwright show-report playwright-reports/with-wallet-ajna-optimism",
"test:report:with-wallet:morphoblue": "npx playwright show-report playwright-reports/with-wallet-morphoblue",
"test:report:with-wallet:maker-and-spark": "npx playwright show-report playwright-reports/with-wallet-maker-and-spark",
"test:report:with-wallet:refinance": "npx playwright show-report playwright-reports/with-wallet-refinance",
"//-10a": "---------------------------------------------------------------",
"//-10b": "---------------------- MANUAL TESTING UTILS --------------------------------",
"//-10c": "---------------------------------------------------------------",
Expand Down
2 changes: 1 addition & 1 deletion tests/withWallet/maker/makerBorrow.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BrowserContext, test } from '@playwright/test';
import { metamaskSetUp } from 'utils/setup';
import { resetState } from '@synthetixio/synpress/commands/synpress';
import * as metamask from '@synthetixio/synpress/commands/metamask';
import { metamaskSetUp } from 'utils/setup';
import * as tenderly from 'utils/tenderly';
import { setup } from 'utils/setup';
import { extremelyLongTestTimeout, veryLongTestTimeout } from 'utils/config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ test.describe('Maker Borrow - Wallet connected', async () => {
});

test.use({
viewport: { width: 1600, height: 850 },
viewport: { width: 1400, height: 720 },
});

// Create a Maker position as part of the Refinance tests setup
test('It should open a Maker Borrow position', async () => {
test('It should open a Maker Borrow position @refinance', async () => {
test.info().annotations.push({
type: 'Test case',
description: '11788, 11790',
Expand Down Expand Up @@ -101,7 +101,7 @@ test.describe('Maker Borrow - Wallet connected', async () => {
await app.position.manage.shouldHaveButton({ label: 'WBTC' });
});

test('It should refinance a Maker Borrow position (WBTC/DAI) to Spark Borrow (sDAI/ETH)', async () => {
test('It should refinance a Maker Borrow position (WBTC/DAI) to Spark Borrow (sDAI/ETH) @refinance', async () => {
test.info().annotations.push({
type: 'Test case',
description: '11788, 11790',
Expand Down

0 comments on commit 5f18fb0

Please sign in to comment.