chore: add / update workflows to do folder filtering (#153)

* Reflect Polygon -> Eth Mainnet change in main readme

* chore: add / update workflows to do folder filtering and run change specific tests.

* chore: run workflows based on both the path and the target branch of pr.

* chore: add graphclient generation command to ui workflow

Co-authored-by: Camila Sosa Morales <camisosa@fleek.xyz>

* style: fix indentation in the ui workflow yml file

---------

Co-authored-by: Janison Sivarajah <jsonsivar@gmail.com>
Co-authored-by: Camila Sosa Morales <camisosa@fleek.xyz>
This commit is contained in:
Shredder 2023-03-08 09:50:25 +03:30 committed by GitHub
parent e74e5595da
commit 7387b68571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 84 additions and 72 deletions

View File

@ -1,71 +1,46 @@
name: Tests
on:
pull_request:
branches:
- main
- develop
jobs:
test-contracts:
runs-on: ubuntu-latest
defaults:
run:
working-directory: contracts
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: yarn --ignore-scripts
- name: Audit
run: yarn audit --groups dependencies
- name: Compile
run: yarn compile
- name: Run Test
run: yarn test
test-ui:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: yarn --ignore-scripts
- name: Audit
run: yarn audit --groups dependencies
- name: Build
run: yarn build
name: Contract
on:
pull_request:
branches:
- main
- develop
paths:
- 'contracts/**'
jobs:
test-contracts:
runs-on: ubuntu-latest
defaults:
run:
working-directory: contracts
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: yarn --ignore-scripts
- name: Audit
run: yarn audit --groups dependencies
- name: Compile
run: yarn compile
- name: Run Test
run: yarn test

View File

@ -6,7 +6,6 @@ on:
- main
jobs:
test-subgraph:
runs-on: ubuntu-latest

38
.github/workflows/ui.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: UI
on:
pull_request:
branches:
- main
- develop
paths:
- 'ui/**'
jobs:
test-ui:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: yarn --ignore-scripts
- name: Create .graphclient folder
run: yarn graphclient build
- name: Audit
run: yarn audit --groups dependencies
- name: Build
run: yarn build