Add tripleaceme/dbt-anomaly-detector #287
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: Tests and Code Checks | |
| on: [pull_request] | |
| jobs: | |
| verify-json: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - name: Validate JSON | |
| run: "cat hub.json | python3 -m json.tool" | |
| code-quality: | |
| name: code-quality | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install python dependencies with uv | |
| run: | | |
| uv tool install pre-commit --with pre-commit-uv | |
| pre-commit --version | |
| uv sync --extra test | |
| - name: Run pre-commit hooks | |
| run: pre-commit run --all-files --show-diff-on-failure | |
| unit: | |
| name: unit test / python ${{ matrix.python-version }} / ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11"] | |
| os: [ubuntu-latest] | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies with uv | |
| run: | | |
| uv sync --extra test | |
| - name: Install dbt fusion (for integration tests) | |
| run: | | |
| curl -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh -s -- --update | |
| - name: Run tests with pytest | |
| run: | | |
| uv run pytest tests/ -v --tb=short |