diff --git a/.github/workflows/test.yml b/.github/workflows/contract.yml similarity index 55% rename from .github/workflows/test.yml rename to .github/workflows/contract.yml index 3869879..8fd65a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/contract.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/subgraph.yml b/.github/workflows/subgraph.yml index 43a7dcd..0505785 100644 --- a/.github/workflows/subgraph.yml +++ b/.github/workflows/subgraph.yml @@ -6,7 +6,6 @@ on: - main jobs: - test-subgraph: runs-on: ubuntu-latest diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml new file mode 100644 index 0000000..35ef11f --- /dev/null +++ b/.github/workflows/ui.yml @@ -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