From dd1fa73076fcf0b5926436e26fd7685faaddb454 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswami Date: Tue, 1 Aug 2023 18:11:51 +0000 Subject: [PATCH 1/3] Add CI pipeline --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ libs/package.json | 3 ++- package.json | 4 +++- 3 files changed, 31 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 0000000..4f3655f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Full CI Pipeline + +on: + pull_request: + branches: [ main ] + +jobs: + lint: + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2.4.1 + with: + node-version: 18 + cache: 'yarn' + - run: yarn + - run: yarn lint + + build: + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2.4.1 + with: + node-version: 18 + cache: 'yarn' + - run: yarn + - run: yarn build diff --git a/libs/package.json b/libs/package.json index 3306405..1c125ac 100644 --- a/libs/package.json +++ b/libs/package.json @@ -11,6 +11,7 @@ "-i,--interlaced": "Print the output of commands in real-time instead of buffering it", "-j,--jobs": "The maximum number of parallel tasks that the execution will be limited to", "-t,--topological": "Run the command after all workspaces it depends on (regular) have finished", - "build": "yarn workspace skiff-utils build && yarn workspace skiff-mail-protos build && yarn workspace skiff-graphql build && yarn workspace @skiff-org/skiff-crypto build && yarn workspace skiff-front-graphql build && yarn workspace skiff-front-utils build" + "build": "yarn workspace skiff-utils build && yarn workspace skiff-mail-protos build && yarn workspace skiff-graphql build && yarn workspace @skiff-org/skiff-crypto build && yarn workspace skiff-front-graphql build && yarn workspace skiff-front-utils build && yarn workspace skiff-prosemirror build", + "lint": "yarn workspace skiff-utils lint && yarn workspace skiff-mail-protos lint && yarn workspace skiff-graphql lint && yarn workspace @skiff-org/skiff-crypto lint && yarn workspace skiff-front-graphql lint && yarn workspace skiff-front-utils lint && yarn workspace skiff-prosemirror lint" } } diff --git a/package.json b/package.json index 753d8c1..9ee3f2a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "scripts": { "postinstall": "yarn workspace @skiff-org/skiff-crypto install", "build:lib": "yarn workspace libs build", - "dev": "yarn workspace skiff-mail-web dev" + "dev": "yarn workspace skiff-mail-web dev", + "lint": "yarn workspace libs lint && yarn workspace skiff-mail-web lint", + "build": "yarn workspace libs build && yarn workspace skiff-mail-web build" } } From 088c567b92e67675542a418bd82a907a9abaf0b5 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswami Date: Tue, 1 Aug 2023 18:13:27 +0000 Subject: [PATCH 2/3] update doc --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c75b69..160b268 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -86,4 +86,4 @@ The core team will promptly review your Pull Request and either merge it or requ ### Code style -Make sure to enable lint on-save. You can also run the commands `yarn prettier` and `yarn lint`. This will be checked by CI when you open a Pull request. +Make sure to enable lint on-save. You can also run the command `yarn lint`. This will be checked by CI when you open a Pull request. From bbe5f181a3f143977f424ab102f8e767264909d7 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswami Date: Tue, 1 Aug 2023 18:15:28 +0000 Subject: [PATCH 3/3] runs-on: ubuntu-latest --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f3655f..e23efd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: jobs: lint: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v2.4.1 @@ -16,6 +17,7 @@ jobs: - run: yarn lint build: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v2.4.1