From 8a7f0857388c74e7fe05ffcd27743a855b5ca53c Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Wed, 9 Oct 2024 15:23:37 -0500 Subject: [PATCH] Update GitHub workflows --- .github/workflows/content-types.yml | 94 +++++++++++++++++++++++++++++ .github/workflows/js-sdk.yml | 22 ------- .github/workflows/mls-client.yml | 22 ------- .github/workflows/noop.yml | 19 +----- .github/workflows/prettier.yml | 27 +++++++++ 5 files changed, 122 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/content-types.yml create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/content-types.yml b/.github/workflows/content-types.yml new file mode 100644 index 000000000..9f5ded514 --- /dev/null +++ b/.github/workflows/content-types.yml @@ -0,0 +1,94 @@ +name: Content types + +on: + push: + branches: + - main + + pull_request: + paths: + - "content-types/**" + - ".github/workflows/content-types.yml" + - "dev/**" + - ".node-version" + - ".nvmrc" + - ".yarnrc.yml" + - "turbo.json" + - "yarn.lock" + +jobs: + typecheck: + name: Typecheck + runs-on: warp-ubuntu-latest-x64-8x + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Typecheck + run: yarn turbo run typecheck --filter='./content-types/*' + + lint: + name: Lint + runs-on: warp-ubuntu-latest-x64-8x + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Lint + run: yarn turbo run lint --filter='./content-types/*' + + test: + name: Test + runs-on: warp-ubuntu-latest-x64-8x + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Start dev environment + run: ./dev/up + - name: Sleep for 5 seconds + run: sleep 5s + - name: Run tests + run: yarn turbo run test --filter='./content-types/*' + + build: + name: Build + runs-on: warp-ubuntu-latest-x64-8x + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Build + run: yarn turbo run build --filter='./content-types/*' diff --git a/.github/workflows/js-sdk.yml b/.github/workflows/js-sdk.yml index b51ce1cc9..0e793ff56 100644 --- a/.github/workflows/js-sdk.yml +++ b/.github/workflows/js-sdk.yml @@ -12,8 +12,6 @@ on: - "dev/**" - ".node-version" - ".nvmrc" - - ".prettierignore" - - ".prettierrc.cjs" - ".yarnrc.yml" - "turbo.json" - "yarn.lock" @@ -59,26 +57,6 @@ jobs: cd packages/js-sdk yarn lint - prettier: - name: Prettier - runs-on: warp-ubuntu-latest-x64-8x - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - cache: "yarn" - env: - SKIP_YARN_COREPACK_CHECK: "1" - - name: Enable corepack - run: corepack enable - - name: Install dependencies - run: yarn - - name: Format check - run: | - cd packages/js-sdk - yarn format:check - test: name: Test runs-on: warp-ubuntu-latest-x64-8x diff --git a/.github/workflows/mls-client.yml b/.github/workflows/mls-client.yml index b97436cdd..3dad471af 100644 --- a/.github/workflows/mls-client.yml +++ b/.github/workflows/mls-client.yml @@ -12,8 +12,6 @@ on: - "dev/**" - ".node-version" - ".nvmrc" - - ".prettierignore" - - ".prettierrc.cjs" - ".yarnrc.yml" - "turbo.json" - "yarn.lock" @@ -59,26 +57,6 @@ jobs: cd packages/mls-client yarn lint - prettier: - name: Prettier - runs-on: warp-ubuntu-latest-x64-8x - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - cache: "yarn" - env: - SKIP_YARN_COREPACK_CHECK: "1" - - name: Enable corepack - run: corepack enable - - name: Install dependencies - run: yarn - - name: Format check - run: | - cd packages/mls-client - yarn format:check - test: name: Test runs-on: warp-ubuntu-latest-x64-8x diff --git a/.github/workflows/noop.yml b/.github/workflows/noop.yml index 9dad12eee..4e0d4892a 100644 --- a/.github/workflows/noop.yml +++ b/.github/workflows/noop.yml @@ -11,6 +11,7 @@ on: - ".github/**" - "!.github/workflows/js-sdk.yml" - "!.github/workflows/mls-client.yml" + - "!.github/workflows/content-types.yml" - ".vscode/**" - ".yarn/**" - "*" @@ -35,24 +36,6 @@ jobs: steps: - run: echo "Nothing to lint" - prettier: - name: Prettier - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - cache: "yarn" - env: - SKIP_YARN_COREPACK_CHECK: "1" - - name: Enable corepack - run: corepack enable - - name: Install dependencies - run: yarn - - name: Format check - run: yarn prettier -c . - test: name: Test runs-on: ubuntu-latest diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 000000000..9b3575ff7 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,27 @@ +name: Format check + +on: + push: + branches: + - main + + pull_request: + +jobs: + prettier: + name: Prettier + runs-on: warp-ubuntu-latest-x64-8x + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Format check + run: yarn format:check