From b1ddcb5c4929fccb241814629f819587cd345879 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 24 Sep 2021 10:47:06 +1000 Subject: [PATCH] Add CI --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ package.json | 1 + packages/status-communities/package.json | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..8d703091 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup node 14 + uses: actions/setup-node@v1 + with: + node-version: 14.x + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn test diff --git a/package.json b/package.json index 2fd85f29..c05f5521 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "fix": "run-s 'fix:*'", "fix:prettier": "prettier \"./*.json\" --write", "build": "wsrun -e -c -s build", + "test": "wsrun -e -c -s test", "sc": "yarn workspace status-communities" }, "devDependencies": { diff --git a/packages/status-communities/package.json b/packages/status-communities/package.json index 09a82cd4..1cd1605c 100644 --- a/packages/status-communities/package.json +++ b/packages/status-communities/package.json @@ -14,10 +14,10 @@ "fix": "run-s 'fix:*'", "fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" --write", "fix:lint": "eslint src --ext .ts --fix", + "test": "run-s 'test:*'", "test:lint": "eslint src --ext .ts", "test:prettier": "prettier \"src/**/*.ts\" \"./*.json\" --list-different", - "test:spelling": "cspell \"{README.md,.github/*.md,guides/*.md,src/**/*.ts}\"", - "test:unit": "nyc --silent mocha", + "test:unit": "mocha", "proto": "run-s 'proto:*'", "proto:lint": "buf lint", "proto:build": "buf generate"