Update copyright notes #158
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 | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout vitallens-python | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install ffmpeg | |
| uses: Iamshankhadeep/[email protected] | |
| with: | |
| version: "4.4" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install vitallens-python and test dependencies | |
| run: | | |
| python -m pip install --upgrade pip "setuptools>=65.5.1" | |
| python -m pip install ".[test]" | |
| - name: Security audit | |
| run: | | |
| python -m pip install pip-audit | |
| python -m pip_audit | |
| - name: Set development API_URL for non-main branches | |
| run: | | |
| echo "API_URL=https://api-dev.rouast.com/vitallens-dev/file" >> $GITHUB_ENV | |
| echo "API_RESOLVE_URL=https://api-dev.rouast.com/vitallens-dev/resolve-model" >> $GITHUB_ENV | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| - name: Test with pytest | |
| env: | |
| VITALLENS_DEV_API_KEY: ${{ secrets.VITALLENS_DEV_API_KEY }} | |
| VITALLENS_API_ORIGIN: "test" | |
| run: | | |
| pytest | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout vitallens-python | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~\AppData\Local\pip\Cache | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install ffmpeg | |
| uses: Iamshankhadeep/[email protected] | |
| with: | |
| version: "4.4" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install vitallens-python and test dependencies | |
| run: | | |
| python -m pip install --upgrade pip "setuptools>=65.5.1" | |
| python -m pip install ".[test]" | |
| - name: Security audit | |
| run: | | |
| python -m pip install pip-audit | |
| python -m pip_audit | |
| - name: Set development API_URL for non-main branches | |
| run: | | |
| echo "API_URL=https://api-dev.rouast.com/vitallens-dev/file" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| echo "API_RESOLVE_URL=https://api-dev.rouast.com/vitallens-dev/resolve-model" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| - name: Test with pytest | |
| env: | |
| VITALLENS_DEV_API_KEY: ${{ secrets.VITALLENS_DEV_API_KEY }} | |
| VITALLENS_API_ORIGIN: "test" | |
| run: | | |
| pytest |