diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 53389ad..8ea857b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,5 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Init run: npm ci - - name: Run tests + - name: Run unit tests run: npm run test + - name: Test build + run: npm run build diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index ac3ac8d..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Node CI - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install and test-builds - run: | - npm ci - npm run test-builds - env: - CI: true diff --git a/matchstick.yaml b/matchstick.yaml index 6fc66c3..871e928 100644 --- a/matchstick.yaml +++ b/matchstick.yaml @@ -1,2 +1,2 @@ testsFolder: test -manifestPath: subgraph.template.yaml \ No newline at end of file +manifestPath: subgraph.template.yaml diff --git a/package.json b/package.json index 18d9802..00d7f98 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "test-builds": "bash test-builds.sh", "codegen": "graph codegen subgraph.template.yaml", "test": "npm run codegen && graph test", - "test-docker": "npm run codegen && docker run -it --rm -v $(pwd):/matchstick/subgraph rainprotocol/matchstick:main" + "test-docker": "npm run codegen && docker run -it --rm -v $(pwd):/matchstick/subgraph rainprotocol/matchstick:main", + "build": "npm run codegen && graph build subgraph.${NETWORK_NAME:-bellecour}.yaml" }, "homepage": "https://github.com/iExecBlockchainComputing/PoCo-subgraph.git#readme", "repository": { diff --git a/test-builds.sh b/test-builds.sh deleted file mode 100755 index efe5ad0..0000000 --- a/test-builds.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Copyright 2020 IEXEC BLOCKCHAIN TECH -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -for subgraph in `ls subgraph.*.yaml`; -do - echo "testing $subgraph build" - graph codegen $subgraph - graph build $subgraph -done;