Reproduce PlantCAD1 using Marin #9
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: Run unit tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| node-version: ["20.10.0"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup pandoc | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| with: | |
| pandoc-version: '3.1.11' # Pin version for cache consistency | |
| - name: Cache dependencies | |
| id: cache-deps | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.cache/uv | |
| ~/.npm | |
| ~/node_modules | |
| key: ${{ runner.os }}-deps-v1-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-deps-v1- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install "uv>=0.7.19" toml | |
| npm install -g pandiff | |
| uv sync --dev --extra=cpu | |
| - name: Set up Google Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v1 | |
| with: | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: ${{ secrets.NEW_GCP_JSON }} | |
| - name: Test with pytest | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| CI: true | |
| run: | | |
| PYTHONPATH=tests:. uv run --extra=cpu pytest -n3 --durations=5 --tb=no -m 'not slow' -vv tests/ |