Merge pull request #168 from bdrung/use-timestamp #590
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: CI/CD | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: [{cron: '1 0 * * 6'}] | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| COMPOSE_DOCKER_CLI_BUILD: "1" | |
| BUILDKIT_PROGRESS: "plain" | |
| RELEASABLE_REPOS: "^kiorky/" | |
| RELEASABLE_BRANCHES: "^(refs/heads/)?(master|main|new-packaging)$" | |
| jobs: | |
| test-code-QA: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache tox environments | |
| uses: actions/cache@v4 | |
| with: | |
| path: .tox | |
| key: ${{ runner.os }}-${{ matrix.python }}-toxQA | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: {python-version: "${{ matrix.python-version }}", cache: pip, cache-dependency-path: 'requirements/*.txt'} | |
| - name: install tests dependencies | |
| run: pip install -r requirements/test.txt -r requirements/lint.txt -r requirements/tox.txt -r requirements/format.txt | |
| - name: formatters check | |
| run: tox --current-env -e lint,fmt | |
| test-py3: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache tox environments | |
| uses: actions/cache@v4 | |
| with: | |
| path: .tox | |
| key: ${{ runner.os }}-${{ matrix.python }}-tox | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: {python-version: "${{ matrix.python-version }}", cache: pip, cache-dependency-path: 'requirements/*.txt'} | |
| - name: install tests dependencies | |
| run: pip install -r requirements/test.txt -r requirements/tox.txt | |
| - name: run tests with coverage | |
| run: tox --current-env -e cov | |
| test-32bits: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Cache tox environments | |
| uses: actions/cache@v4 | |
| with: | |
| path: .dockertox | |
| key: ${{ runner.os }}-${{ matrix.python }}-dockertox | |
| - name: Test with pytest | |
| run: | | |
| docker compose build --build-arg BASE=corpusops/croniter:32bits | |
| docker compose run --rm app tox --current-env -e test | |
| env: {COMPOSE_FILE: "docker-compose.yml:docker-compose-32bits.yml"} | |