mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
build: only run scripts on changed content
This commit is contained in:
36
.github/workflows/tests.yml
vendored
36
.github/workflows/tests.yml
vendored
@@ -24,17 +24,37 @@ jobs:
|
||||
- name: Install dependencies
|
||||
uses: ./packages/actions/src/yarnCache
|
||||
|
||||
- name: Build dependencies
|
||||
run: yarn build
|
||||
- name: Build dependencies (PR)
|
||||
if: ${{ github.event_name != 'push' }}
|
||||
run: yarn build -- --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
|
||||
|
||||
- name: ESLint
|
||||
run: yarn lint -- --format=compact
|
||||
- name: Build dependencies (Push)
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: yarn test -- --filter="...[HEAD^1]"
|
||||
|
||||
- name: Tests
|
||||
run: yarn test
|
||||
- name: ESLint (PR)
|
||||
if: ${{ github.event_name != 'push' }}
|
||||
run: yarn lint -- --format=compact --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
|
||||
|
||||
- name: Docs
|
||||
run: yarn docs
|
||||
- name: ESLint (Push)
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: yarn lint -- --format=compact --filter="...[HEAD^1]"
|
||||
|
||||
- name: Tests (PR)
|
||||
if: ${{ github.event_name != 'push' }}
|
||||
run: yarn test -- --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
|
||||
|
||||
- name: Tests (Push)
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: yarn test -- --filter="...[HEAD^1]"
|
||||
|
||||
- name: Docs (PR)
|
||||
if: ${{ github.event_name != 'push' }}
|
||||
run: yarn docs -- --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
|
||||
|
||||
- name: Docs (Push)
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: yarn docs -- --filter="...[HEAD^1]"
|
||||
|
||||
- name: Upload Coverage
|
||||
if: github.repository_owner == 'discordjs'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn build && yarn lint-staged
|
||||
yarn build:affected && yarn lint-staged
|
||||
|
||||
@@ -5,12 +5,18 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"build:affected": "turbo run build --filter='...[origin/main]'",
|
||||
"test": "turbo run test --parallel",
|
||||
"test:affected": "turbo run test --filter='...[origin/main]' --parallel",
|
||||
"lint": "turbo run lint --parallel",
|
||||
"lint:affected": "turbo run lint --filter='...[origin/main]' --parallel",
|
||||
"format": "turbo run format --parallel",
|
||||
"format:affected": "turbo run format --filter='...[origin/main]' --parallel",
|
||||
"fmt": "turbo run format --parallel",
|
||||
"postinstall": "is-ci || husky install",
|
||||
"fmt:affected": "turbo run format --filter='...[origin/main]' --parallel",
|
||||
"docs": "turbo run docs --parallel",
|
||||
"docs:affected": "turbo run docs --filter='...[origin/main]' --parallel",
|
||||
"postinstall": "is-ci || husky install",
|
||||
"update": "yarn upgrade-interactive",
|
||||
"create-package": "node packages/scripts/src/packageScript.mjs"
|
||||
},
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
SOME CHANGE
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
|
||||
Reference in New Issue
Block a user