Skip to content

@tus/s3-store: keep cached metadata in sync on length declaration and cleanup #142

@tus/s3-store: keep cached metadata in sync on length declaration and cleanup

@tus/s3-store: keep cached metadata in sync on length declaration and cleanup #142

Workflow file for this run

name: Secret-backed tests

Check warning on line 1 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / Secret-backed tests

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
# SECURITY: External PRs require protected-environment approval before their
# proposed merge can be checked out and executed with test credentials.
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- ".changeset/**"
pull_request_target:
types: [opened, synchronize, reopened]
paths-ignore:
- "**.md"
- ".changeset/**"
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}--${{ github.event_name == 'pull_request_target' && format('pr#{0}', github.event.pull_request.number) || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
# Push events, merge groups, and internal PRs run without environment protection.
# External PRs require manual approval via the external-testing environment.
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external-testing' || '' }}
steps:
- name: Checkout sources
uses: actions/checkout@v7
with:
# Test GitHub's proposed merge, including the current base.
# If the merge ref does not exist, checkout fails instead of testing the base.
# External PRs cannot reach this step until the environment is approved.
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.sha }}
allow-unsafe-pr-checkout: true
- name: Decrypt keyfile
run: ./.github/scripts/decrypt_secret.sh
env:
KEYFILE_PASSPHRASE: ${{secrets.KEYFILE_PASSPHRASE}}
- name: Install Node.js
uses: actions/setup-node@v7
with:
# Keep the published Node 20 compatibility check.
node-version: 20.x
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci --no-fund --no-audit
- name: Build
run: npm run build
- name: Run tests
run: npm run test
env:
AWS_BUCKET: ${{secrets.AWS_BUCKET}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
AZURE_ACCOUNT_ID: ${{secrets.AZURE_ACCOUNT_ID}}
AZURE_ACCOUNT_KEY: ${{secrets.AZURE_ACCOUNT_KEY}}
AZURE_CONTAINER_NAME: ${{secrets.AZURE_CONTAINER_NAME}}
AWS_REGION: ${{secrets.AWS_REGION}}