build: fix linting

This commit is contained in:
iCrawl
2023-08-24 23:08:29 +02:00
parent 9811514deb
commit e3127a0735
29 changed files with 338 additions and 172 deletions

34
.github/workflows/cleanup-cache.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
name: Cleanup caches
on:
pull_request:
types:
- closed
jobs:
cleanup:
name: Cleanup caches
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cleanup caches
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -73,7 +73,7 @@ jobs:
' ',
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
].join('\n')
core.setOutput("comment", comment);
core.setOutput("comment", comment);
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Add comment to PR

View File

@@ -29,35 +29,35 @@ jobs:
- name: Build dependencies (PR)
if: ${{ github.event_name != 'push' }}
run: yarn turbo build --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}] --concurrency=3"
run: yarn turbo run build --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3
- name: Build dependencies (Push)
if: ${{ github.event_name == 'push' }}
run: yarn turbo build --filter="...[HEAD^1] --concurrency=3"
run: yarn turbo run build --filter="...[HEAD^1]" --concurrency=3
- name: ESLint (PR)
if: ${{ github.event_name != 'push' }}
run: yarn turbo lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3 -- --format=compact
run: yarn turbo run lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3 -- --format=compact
- name: ESLint (Push)
if: ${{ github.event_name == 'push' }}
run: yarn turbo lint --filter="...[HEAD^1]" --concurrency=3 -- --format=compact
run: yarn turbo run lint --filter="...[HEAD^1]" --concurrency=3 -- --format=compact
- name: Tests (PR)
if: ${{ github.event_name != 'push' }}
run: yarn turbo test --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3
run: yarn turbo run test --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3
- name: Tests (Push)
if: ${{ github.event_name == 'push' }}
run: yarn turbo test --filter="...[HEAD^1]" --concurrency=3
run: yarn turbo run test --filter="...[HEAD^1]" --concurrency=3
- name: Docs (PR)
if: ${{ github.event_name != 'push' }}
run: yarn turbo docs --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3
run: yarn turbo run docs --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=3
- name: Docs (Push)
if: ${{ github.event_name == 'push' }}
run: yarn turbo docs --filter="...[HEAD^1]" --concurrency=3
run: yarn turbo run docs --filter="...[HEAD^1]" --concurrency=3
- name: Upload Coverage
if: github.repository_owner == 'discordjs'