mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
* Use a turbo remote cache server for CI `rharkor/caching-for-turbo` uses github actions cache to provide a remote cache server for turbo, so we can use previuously created cache if available and requested by turbo, and this doesn't have the downside of having the cache growing indefinitely like with normal github actions cache as since the single caches are uploaded to the github actions cache, github can evict the old cache when it's not used or there is no space left. Also add turbo to website so we can cache the build * Use turbo for website build & build:doc * fix typo, tubo -> turbo --------- Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
199 lines
4.8 KiB
YAML
199 lines
4.8 KiB
YAML
name: Library Checks
|
|
permissions:
|
|
contents: read
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
merge_group:
|
|
|
|
jobs:
|
|
build-type-and-test:
|
|
name: Build Type and Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 20
|
|
cache: yarn
|
|
- run: yarn install --immutable
|
|
- name: Cache for Turbo
|
|
uses: rharkor/caching-for-turbo@v2.3.5
|
|
with:
|
|
cache-prefix: turbo-cache-
|
|
- name: Build Types
|
|
run: yarn build:type
|
|
|
|
build-dist:
|
|
name: Build Dist
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 20
|
|
cache: yarn
|
|
- run: yarn install --immutable
|
|
- name: Cache for Turbo
|
|
uses: rharkor/caching-for-turbo@v2.3.5
|
|
with:
|
|
cache-prefix: turbo-cache-
|
|
- name: Build Dist
|
|
run: yarn build
|
|
|
|
format:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
needs: build-type-and-test
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 20
|
|
cache: yarn
|
|
- run: yarn install --immutable
|
|
- name: Cache for Turbo
|
|
uses: rharkor/caching-for-turbo@v2.3.5
|
|
with:
|
|
cache-prefix: turbo-cache-
|
|
- name: Build Types
|
|
run: yarn build:type
|
|
- name: Check Formatting
|
|
run: yarn biome ci --reporter=github
|
|
|
|
test-type-unit-and-integration-test:
|
|
name: Typecheck Tests
|
|
runs-on: ubuntu-latest
|
|
needs: build-type-and-test
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 20
|
|
cache: yarn
|
|
- run: yarn install --immutable
|
|
- name: Cache for Turbo
|
|
uses: rharkor/caching-for-turbo@v2.3.5
|
|
with:
|
|
cache-prefix: turbo-cache-
|
|
- name: Test Type Test
|
|
run: yarn test:test-type
|
|
|
|
# Not using matrix because test later on cant needs a specific job
|
|
bot-unit-test:
|
|
name: Bot
|
|
needs: [build-dist]
|
|
uses: ./.github/workflows/unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: bot
|
|
# https://github.com/orgs/community/discussions/12835
|
|
# bot-e2e-test:
|
|
# name: Bot
|
|
# needs: bot-unit-test
|
|
# if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'merge_group' }}
|
|
# uses: ./.github/workflows/e2e-test.yml
|
|
# secrets: inherit
|
|
# with:
|
|
# package: bot
|
|
bot-other-runtime-test:
|
|
name: Bot
|
|
needs: bot-unit-test
|
|
uses: ./.github/workflows/other-runtime-unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: bot
|
|
|
|
discordeno-unit-test:
|
|
name: Discordeno
|
|
needs: [build-dist]
|
|
uses: ./.github/workflows/unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: discordeno
|
|
discordeno-other-runtime-test:
|
|
name: Discordeno
|
|
needs: discordeno-unit-test
|
|
uses: ./.github/workflows/other-runtime-unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: discordeno
|
|
|
|
gateway-unit-test:
|
|
name: Gateway
|
|
needs: [build-dist]
|
|
uses: ./.github/workflows/unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: gateway
|
|
gateway-integration-test:
|
|
name: Gateway
|
|
needs: build-dist
|
|
uses: ./.github/workflows/integration-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: gateway
|
|
gateway-other-runtime-test:
|
|
name: Gateway
|
|
needs: [gateway-unit-test]
|
|
uses: ./.github/workflows/other-runtime-unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: gateway
|
|
|
|
rest-unit-test:
|
|
name: Rest
|
|
needs: [build-dist]
|
|
uses: ./.github/workflows/unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: rest
|
|
# https://github.com/orgs/community/discussions/12835
|
|
# rest-e2e-test:
|
|
# name: Rest
|
|
# needs: rest-unit-test
|
|
# if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'merge_group' }}
|
|
# uses: ./.github/workflows/e2e-test.yml
|
|
# secrets: inherit
|
|
# with:
|
|
# package: rest
|
|
rest-other-runtime-test:
|
|
name: Rest
|
|
needs: rest-unit-test
|
|
uses: ./.github/workflows/other-runtime-unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: rest
|
|
|
|
types-unit-test:
|
|
name: Types
|
|
needs: [build-dist]
|
|
uses: ./.github/workflows/unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: types
|
|
types-other-runtime-test:
|
|
name: Types
|
|
needs: types-unit-test
|
|
uses: ./.github/workflows/other-runtime-unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: types
|
|
|
|
utils-unit-test:
|
|
name: Utils
|
|
needs: [build-dist]
|
|
uses: ./.github/workflows/unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: utils
|
|
utils-other-runtime-test:
|
|
name: Utils
|
|
needs: utils-unit-test
|
|
uses: ./.github/workflows/other-runtime-unit-test.yml
|
|
secrets: inherit
|
|
with:
|
|
package: utils
|