From b8cc684c122aa951b4a1ea54cb354a1df984e01a Mon Sep 17 00:00:00 2001 From: Matias Poblete <86752543+MattPoblete@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:14:52 -0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run-tests.yml | 39 ++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c2565251..96efc88b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -8,15 +8,7 @@ permissions: packages: none jobs: - run-tests: - env: - NEXT_PUBLIC_BACKEND_URL: ${{vars.NEXT_PUBLIC_BACKEND_URL}} - NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY: ${{secrets.NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY}} - NEXT_PUBLIC_SOROSWAP_BACKEND_URL: ${{vars.NEXT_PUBLIC_SOROSWAP_BACKEND_URL}} - NEXT_PUBLIC_SOROSWAP_BACKEND_ENABLED: ${{vars.NEXT_PUBLIC_SOROSWAP_BACKEND_ENABLED}} - NEXT_PUBLIC_DEFAULT_NETWORK: ${{vars.NEXT_PUBLIC_DEFAULT_NETWORK}} - NEXT_PUBLIC_TRUSTLINE_WALLET_PUBLIC_KEY: ${{vars.NEXT_PUBLIC_TRUSTLINE_WALLET_PUBLIC_KEY}} - NEXT_PUBLIC_TEST_TOKENS_ADMIN_SECRET_KEY: ${{secrets.NEXT_PUBLIC_TEST_TOKENS_ADMIN_SECRET_KEY}} + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 @@ -35,8 +27,35 @@ jobs: - name: Build app run: yarn build + deploy_app: + env: + NEXT_PUBLIC_BACKEND_URL: ${{vars.NEXT_PUBLIC_BACKEND_URL}} + NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY: ${{secrets.NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY}} + NEXT_PUBLIC_SOROSWAP_BACKEND_URL: ${{vars.NEXT_PUBLIC_SOROSWAP_BACKEND_URL}} + NEXT_PUBLIC_SOROSWAP_BACKEND_ENABLED: ${{vars.NEXT_PUBLIC_SOROSWAP_BACKEND_ENABLED}} + NEXT_PUBLIC_DEFAULT_NETWORK: ${{vars.NEXT_PUBLIC_DEFAULT_NETWORK}} + NEXT_PUBLIC_TRUSTLINE_WALLET_PUBLIC_KEY: ${{vars.NEXT_PUBLIC_TRUSTLINE_WALLET_PUBLIC_KEY}} + NEXT_PUBLIC_TEST_TOKENS_ADMIN_SECRET_KEY: ${{secrets.NEXT_PUBLIC_TEST_TOKENS_ADMIN_SECRET_KEY}} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - name: Set up Node.js + uses: actions/setup-node@v4.0.2 + with: + node-version: '20.10.0' - name: Run app run: yarn pm2 start next + run-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - name: Set up Node.js + uses: actions/setup-node@v4.0.2 + with: + node-version: '20.10.0' + - name: Run test - run: yarn cy:run + run: yarn cy:run \ No newline at end of file