fix(file): guard against already-removed blob-lock in GC (#1741) #5020
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: Python | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| python: [ "3.12", "3.13" ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| path: viur | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install dependencies | |
| run: | | |
| cd viur/tests | |
| python -m pip install -U pip | |
| python -m pip install -e ..[testing] | |
| - name: Run the tests | |
| run: | | |
| pwd | |
| python ./viur/tests/main.py | |
| echo $? | |
| pwd | |
| - name: Build Coverage | |
| if: ${{ matrix.python == '3.13' && github.event_name == 'push' && github.ref_name == 'main' }} | |
| working-directory: viur/tests/ | |
| run: | | |
| # generate coverage | |
| coverage run -m unittest discover | |
| coverage report | |
| coverage html | |
| coverage xml | |
| genbadge coverage -i ./coverage.xml -o ./htmlcov/coverage.svg | |
| # use relative paths | |
| find ./htmlcov/ -type f -exec \ | |
| sed -i 's:'$(dirname $(pwd))'/core/::g' {} + | |
| # Remove .gitignore, otherwise nothing would be committed to the gh-pages branch | |
| rm htmlcov/.gitignore | |
| - name: Deploy Coverage | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: ${{ matrix.python == '3.13' && github.event_name == 'push' && github.ref_name == 'main' }} | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./viur/tests/htmlcov | |
| publish_branch: coverage-html | |
| allow_empty_commit: true |