From e371eaae0831fbd12e6511fdd4197a2171b62016 Mon Sep 17 00:00:00 2001 From: alan890104 Date: Sun, 7 Jan 2024 22:02:41 +0800 Subject: [PATCH] feat: Add CI workflow for automated testing --- .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..301d331 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +name: CI + +# trigger on Pull request for all branches and on push for master branch +on: + pull_request: + branches: + - '*' + push: + branches: + - master +jobs: + build: + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + node: [18] + steps: + - uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: 'yarn' + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build contracts + run: yarn build --all + - name: Run tests + run: yarn test