mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
chore: Update yarn, refactor packages setup (#4085)
* Update yarn, refactor packages setup * Rename some jobs in lib-check.yml * Update website/yarn.lock * Revert build-type-and-test job name change
This commit is contained in:
10
.github/workflows/e2e-test.yml
vendored
10
.github/workflows/e2e-test.yml
vendored
@@ -19,15 +19,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
|
||||
10
.github/workflows/integration-test.yml
vendored
10
.github/workflows/integration-test.yml
vendored
@@ -16,15 +16,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
|
||||
1
.github/workflows/lib-check-e2e.yml
vendored
1
.github/workflows/lib-check-e2e.yml
vendored
@@ -29,7 +29,6 @@ jobs:
|
||||
bot-e2e-test:
|
||||
name: Bot
|
||||
needs: rest-e2e-test
|
||||
if: ${{ always() }}
|
||||
uses: ./.github/workflows/e2e-test.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
|
||||
48
.github/workflows/lib-check.yml
vendored
48
.github/workflows/lib-check.yml
vendored
@@ -18,15 +18,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
@@ -34,7 +26,7 @@ jobs:
|
||||
with:
|
||||
path: .turbo
|
||||
key: ${{ runner.os }}-turbo-build:type-${{ github.sha }}
|
||||
- name: Build Type and Test
|
||||
- name: Build Types
|
||||
run: yarn build:type --cache-dir=".turbo"
|
||||
|
||||
build-dist:
|
||||
@@ -45,15 +37,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
@@ -64,8 +48,8 @@ jobs:
|
||||
- name: Type Test
|
||||
run: yarn build --cache-dir=".turbo"
|
||||
|
||||
format-unit-and-integration-test:
|
||||
name: Format Test
|
||||
format:
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-type-and-test
|
||||
steps:
|
||||
@@ -73,15 +57,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
@@ -99,7 +75,7 @@ jobs:
|
||||
run: yarn lint --cache-dir=".turbo"
|
||||
|
||||
test-type-unit-and-integration-test:
|
||||
name: Test Type Test
|
||||
name: Typecheck Tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-type-and-test
|
||||
steps:
|
||||
@@ -107,15 +83,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
|
||||
20
.github/workflows/other-runtime-unit-test.yml
vendored
20
.github/workflows/other-runtime-unit-test.yml
vendored
@@ -16,18 +16,10 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
- uses: denoland/setup-deno@v2
|
||||
with:
|
||||
deno-version: 'v2.1.x'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
@@ -51,18 +43,10 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: '1.1.42'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
|
||||
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@@ -27,17 +27,9 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
scope: '@discordeno'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn install --immutable
|
||||
- name: build Package
|
||||
run: yarn release-build --filter=./packages/${{ matrix.package }}
|
||||
@@ -45,8 +37,11 @@ jobs:
|
||||
if: ${{ github.event_name != 'release' && github.event.action != 'published' }}
|
||||
run: node ./scripts/bumpVersionByCommit.js ${{ matrix.package }}
|
||||
|
||||
- run: yarn pack
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
|
||||
# If the action is running from a release use the latest tag, otherwise use the next tag
|
||||
- run: npm publish --tag ${{ github.event_name == 'release' && github.event.action == 'published' && 'latest' || 'next' }} --access public --provenance
|
||||
- run: npm publish package.tgz --tag ${{ github.event_name == 'release' && github.event.action == 'published' && 'latest' || 'next' }} --access public --provenance
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
11
.github/workflows/rest-pkg-test-status.yml
vendored
11
.github/workflows/rest-pkg-test-status.yml
vendored
@@ -1,11 +0,0 @@
|
||||
name: Rest Pkg Test Status
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
rest-pkg-test-status:
|
||||
name: Rest Pkg Test Status
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
57
.github/workflows/site.yml
vendored
57
.github/workflows/site.yml
vendored
@@ -1,10 +1,6 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Deploy Docs Site
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the "main" branch
|
||||
push:
|
||||
branches: ['main']
|
||||
paths:
|
||||
@@ -14,54 +10,32 @@ on:
|
||||
- 'package.json'
|
||||
- 'packages/**'
|
||||
pull_request:
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
merge_group:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
name: Build Docusaurus
|
||||
runs-on: ubuntu-latest
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path (root)
|
||||
id: yarn-cache-dir-path-root
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path-root.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
cache-dependency-path: |
|
||||
yarn.lock
|
||||
website/yarn.lock
|
||||
- name: yarn install (root)
|
||||
run: yarn install --immutable
|
||||
- name: Build all pkg
|
||||
run: yarn release-build
|
||||
- name: Build docs
|
||||
run: yarn build:doc
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
working-directory: ./website
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-site-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-site-
|
||||
- run: yarn install --immutable
|
||||
working-directory: ./website
|
||||
- name: Build website
|
||||
@@ -78,31 +52,16 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path (root)
|
||||
id: yarn-cache-dir-path-root
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path-root.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
cache-dependency-path: |
|
||||
yarn.lock
|
||||
website/yarn.lock
|
||||
- name: yarn install (root)
|
||||
run: yarn install --immutable
|
||||
- name: Build all pkg
|
||||
run: yarn release-build
|
||||
- name: Build docs
|
||||
run: yarn build:doc
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
working-directory: ./website
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-site-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-site-
|
||||
- run: yarn install --immutable
|
||||
working-directory: ./website
|
||||
- run: yarn typecheck
|
||||
|
||||
10
.github/workflows/unit-test.yml
vendored
10
.github/workflows/unit-test.yml
vendored
@@ -16,15 +16,7 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
cache: yarn
|
||||
- run: yarn install --immutable
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
|
||||
Reference in New Issue
Block a user