File: python.yml

package info (click to toggle)
sourmash 4.9.4-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,688 kB
  • sloc: python: 59,380; ansic: 332; makefile: 277; sh: 6
file content (85 lines) | stat: -rw-r--r-- 2,167 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# note: to invalidate caches, adjust the pip-v? number below.
name: Python tests

on:
  push:
    branches: [latest]
  pull_request:
  schedule:
    - cron: "0 0 * * *" # daily

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        py: ["3.12", "3.11", "3.13"]
      fail-fast: false

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Python ${{ matrix.py }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.py }}

      - name: Get pip cache dir
        id: pip-cache
        run: |
          echo "::set-output name=dir::$(pip cache dir)"

      - name: pip cache
        uses: actions/cache@v4
        with:
          path: ${{ steps.pip-cache.outputs.dir }}
          key: ${{ runner.os }}-pip-v4-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ runner.os }}-pip-v4-

      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install tox tox-gh-actions

      - name: Set up Pandoc
        uses: r-lib/actions/setup-pandoc@v2

      - name: Set up IPFS
        if: startsWith(runner.os, 'Linux') && (matrix.py == '3.11')
        uses: ibnesayeed/setup-ipfs@master
        with:
          ipfs_version: 0.6
          run_daemon: true

      - name: Start Redis
        if: startsWith(runner.os, 'Linux') && (matrix.py == '3.11')
        uses: supercharge/redis-github-action@1.8.0
        with:
          redis-version: 6

      - name: tox cache
        uses: actions/cache@v4
        with:
          path: .tox/
          key: ${{ runner.os }}-tox-v4-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ runner.os }}-tox-v4-

      - name: Test with tox
        run: tox
        env:
          PYTHONDEVMODE: 1

      - name: Upload Python coverage to codecov
        uses: codecov/codecov-action@v3
        with:
          flags: python
          fail_ci_if_error: true
          files: .tox/coverage.xml