This repository has been archived by the owner on Feb 9, 2025. It is now read-only.
chore: fix docker build issues #477
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Tests (TS)' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/tests-ts.yaml' | |
- 'frontend/**' | |
- 'gen/ts/**' | |
- 'package.json' | |
- 'services/cohere-connector/**' | |
- 'services/openai-connector/**' | |
- 'shared/ts/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'frontend/**' | |
- 'gen/ts/**' | |
- 'services/openai-connector/**' | |
- 'services/cohere-connector/**' | |
- 'shared/ts/**' | |
env: | |
NODE_OPTIONS: '--no-deprecation --max_old_space_size=4096' | |
DEEPSOURCE_DSN: ${{secrets.DEEPSOURCE_DSN}} | |
jobs: | |
test: | |
if: github.ref_name != 'development' && github.ref_name != 'production' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Install PNPM | |
uses: pnpm/action-setup@v2.4.0 | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Setup PNPM Cache | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Load Cached Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install Node dependencies | |
run: pnpm install -r | |
- name: Download the DeepSource CLI | |
run: curl https://deepsource.io/cli | sh | |
- name: Test | |
run: pnpm run test:coverage | |
- name: Upload Coverage Report | |
run: ./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/cobertura-coverage.xml |