diff --git a/.github/workflows/ci.subgraph-basin.yaml b/.github/workflows/ci.subgraph-basin.yaml new file mode 100644 index 0000000000..9b5380af84 --- /dev/null +++ b/.github/workflows/ci.subgraph-basin.yaml @@ -0,0 +1,67 @@ +name: Subgraph Basin + +on: + pull_request: + types: [opened, synchronize] + paths: + - "projects/subgraph-basin/**" + +jobs: + compile: + runs-on: ubuntu-latest + name: Compile + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + - name: Cache Node Modules + id: node-modules-cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + - name: Install The Graph CLI + run: npm install -g @graphprotocol/graph-cli + - name: Install Dependencies + if: steps.node-modules-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Generate Subgraph Code + run: yarn codegen + working-directory: projects/subgraph-basin + + - name: Build Subgraph + run: yarn build + working-directory: projects/subgraph-basin + test: + runs-on: macos-latest + name: Test + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + - name: Cache Node Modules + id: node-modules-cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + - name: Install The Graph CLI + run: npm install -g @graphprotocol/graph-cli + - name: Install Dependencies + if: steps.node-modules-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Generate Subgraph Code + run: yarn codegen + working-directory: projects/subgraph-basin + + - name: Run Tests + run: yarn test + working-directory: projects/subgraph-basin diff --git a/.github/workflows/ci.subgraph-bean.yaml b/.github/workflows/ci.subgraph-bean.yaml index 682f06ccf4..b1736ef293 100644 --- a/.github/workflows/ci.subgraph-bean.yaml +++ b/.github/workflows/ci.subgraph-bean.yaml @@ -44,7 +44,32 @@ jobs: - name: Build Subgraph run: yarn build working-directory: projects/subgraph-bean - # TODO: add matchstick test suite - #- name: Run Tests - # run: yarn test - # working-directory: "${{ matrix.value }}" + test: + runs-on: macos-latest + name: Test + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + - name: Cache Node Modules + id: node-modules-cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + - name: Install The Graph CLI + run: npm install -g @graphprotocol/graph-cli + - name: Install Dependencies + if: steps.node-modules-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Generate Subgraph Code + run: yarn codegen + working-directory: projects/subgraph-bean + + - name: Run Tests + run: yarn test + working-directory: projects/subgraph-bean diff --git a/.github/workflows/ci.subgraph-beanft.yaml b/.github/workflows/ci.subgraph-beanft.yaml new file mode 100644 index 0000000000..df01d60d88 --- /dev/null +++ b/.github/workflows/ci.subgraph-beanft.yaml @@ -0,0 +1,67 @@ +name: Subgraph BeaNFT + +on: + pull_request: + types: [opened, synchronize] + paths: + - "projects/subgraph-beanft/**" + +jobs: + compile: + runs-on: ubuntu-latest + name: Compile + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + - name: Cache Node Modules + id: node-modules-cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + - name: Install The Graph CLI + run: npm install -g @graphprotocol/graph-cli + - name: Install Dependencies + if: steps.node-modules-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Generate Subgraph Code + run: yarn codegen + working-directory: projects/subgraph-beanft + + - name: Build Subgraph + run: yarn build + working-directory: projects/subgraph-beanft + test: + runs-on: macos-latest + name: Test + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + - name: Cache Node Modules + id: node-modules-cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + - name: Install The Graph CLI + run: npm install -g @graphprotocol/graph-cli + - name: Install Dependencies + if: steps.node-modules-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + + - name: Generate Subgraph Code + run: yarn codegen + working-directory: projects/subgraph-beanft + + - name: Run Tests + run: yarn test + working-directory: projects/subgraph-beanft diff --git a/.github/workflows/ci.subgraph-beanstalk.yaml b/.github/workflows/ci.subgraph-beanstalk.yaml index 52669339f2..a2a795e600 100644 --- a/.github/workflows/ci.subgraph-beanstalk.yaml +++ b/.github/workflows/ci.subgraph-beanstalk.yaml @@ -66,17 +66,9 @@ jobs: if: steps.node-modules-cache.outputs.cache-hit != 'true' run: yarn install --immutable - # Generate code and check for uncommitted changes - # https://github.com/marketplace/actions/check-uncommitted-changes - name: Generate Subgraph Code run: yarn codegen working-directory: projects/subgraph-beanstalk - - name: Check for uncommitted changes - id: check-changes - uses: mskri/check-uncommitted-changes-action@v1.0.1 - - name: Evaluate if there are changes - if: steps.check-changes.outputs.outcome == failure() - run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" - name: Run Tests run: yarn test