test(dsl): edge case, V4 regression, and QueryType 10-file chain tests (PR-08) #1510
Workflow file for this run
This file contains hidden or 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: Build and Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - 'sast-engine/**' | |
| - 'python-sdk/**' | |
| - '.github/workflows/**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26.0' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.14' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Install codepathfinder Python package from local | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install -e ./python-sdk | |
| python3 -c "import codepathfinder; print(f'✓ codepathfinder {codepathfinder.__version__} installed at {codepathfinder.__file__}')" | |
| - name: Get dependencies | |
| run: | | |
| cd sast-engine | |
| go mod download | |
| - name: Build binary for integration tests | |
| run: | | |
| cd sast-engine | |
| go build -o build/go/pathfinder . | |
| - name: Test (unit + integration) | |
| env: | |
| INTEGRATION: "1" | |
| run: | | |
| cd sast-engine | |
| go test -p 2 -v ./... -coverprofile=coverage.out -covermode=atomic | |
| - name: Install typeshed-converter dependencies | |
| run: pip install -r sast-engine/tools/typeshed-converter/requirements.txt | |
| - name: Run typeshed-converter tests | |
| run: | | |
| cd sast-engine/tools/typeshed-converter | |
| python -m pytest test_convert.py test_mro.py -v \ | |
| --cov=convert --cov=mro \ | |
| --cov-report=term-missing \ | |
| --cov-fail-under=90 | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| golangci: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sast-engine | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26.0' | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.9.0 | |
| working-directory: sast-engine |