-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #544 from soroswap/feature/ImproveWorkflow
Improve github workflow
- Loading branch information
Showing
3 changed files
with
8,919 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,30 @@ permissions: | |
packages: none | ||
|
||
jobs: | ||
run-tests: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '20.10.0' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build app | ||
run: yarn build | ||
|
||
test-app: | ||
env: | ||
NEXT_PUBLIC_BACKEND_URL: ${{vars.NEXT_PUBLIC_BACKEND_URL}} | ||
NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY: ${{secrets.NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY}} | ||
|
@@ -18,25 +41,27 @@ jobs: | |
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 | ||
needs: build | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '20.10.0' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
|
||
- name: Install cypress | ||
run: yarn cypress install | ||
|
||
- name: Build app | ||
run: yarn build | ||
run: yarn cypress install --force | ||
|
||
- name: Run app | ||
run: yarn pm2 start next | ||
run: yarn pm2 start next | ||
|
||
- name: Run test | ||
run: yarn cy:run | ||
run: yarn cy:run |
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
Oops, something went wrong.