ci: use TEST_IGNORE_SERVICES variable for ignoring services

This commit is contained in:
jj 2025-02-18 09:12:55 +00:00
parent b540e48ffb
commit a52aee2bb3
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -33,4 +33,4 @@ jobs:
- run: pnpm i --frozen-lockfile && node api/src/util/test run-tests-for ${{ matrix.service }}
env:
API_EXTERNAL_PROXY: ${{ secrets.API_EXTERNAL_PROXY }}
TEST_IGNORE_SERVICES: "none"
TEST_IGNORE_SERVICES: ${{ vars.TEST_IGNORE_SERVICES }}

View file

@ -15,7 +15,7 @@ const getTests = (service) => loadJSON(getTestPath(service));
// services that are known to frequently fail due to external
// factors (e.g. rate limiting)
const finnicky = new Set(
typeof process.env.TEST_IGNORE_SERVICES === 'string'
process.env.TEST_IGNORE_SERVICES
? process.env.TEST_IGNORE_SERVICES.split(',')
: ['bilibili', 'instagram', 'facebook', 'youtube', 'vk', 'twitter', 'reddit']
);