|
| 1 | +name: records (application) |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: ~ |
| 6 | + paths: |
| 7 | + - '.github/workflows/application-records.yml' |
| 8 | + - 'application/records/**' |
| 9 | + - '/requirements.txt' |
| 10 | + push: |
| 11 | + branches: [ main ] |
| 12 | + paths: |
| 13 | + - '.github/workflows/application-records.yml' |
| 14 | + - 'application/records/**' |
| 15 | + - '/requirements.txt' |
| 16 | + |
| 17 | + # Allow job to be triggered manually. |
| 18 | + workflow_dispatch: |
| 19 | + |
| 20 | + # Run job each night after CrateDB nightly has been published. |
| 21 | + schedule: |
| 22 | + - cron: '0 3 * * *' |
| 23 | + |
| 24 | +# Cancel in-progress jobs when pushing to the same branch. |
| 25 | +concurrency: |
| 26 | + cancel-in-progress: true |
| 27 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 28 | + |
| 29 | +jobs: |
| 30 | + test: |
| 31 | + name: " |
| 32 | + Python: ${{ matrix.python-version }} |
| 33 | + CrateDB: ${{ matrix.cratedb-version }} |
| 34 | + on ${{ matrix.os }}" |
| 35 | + runs-on: ${{ matrix.os }} |
| 36 | + strategy: |
| 37 | + fail-fast: false |
| 38 | + matrix: |
| 39 | + os: [ 'ubuntu-latest' ] |
| 40 | + python-version: [ '3.9', '3.13' ] |
| 41 | + cratedb-version: [ 'nightly' ] |
| 42 | + |
| 43 | + services: |
| 44 | + cratedb: |
| 45 | + image: crate/crate:${{ matrix.cratedb-version }} |
| 46 | + ports: |
| 47 | + - 4200:4200 |
| 48 | + - 5432:5432 |
| 49 | + env: |
| 50 | + CRATE_HEAP_SIZE: 4g |
| 51 | + |
| 52 | + steps: |
| 53 | + |
| 54 | + - name: Acquire sources |
| 55 | + uses: actions/checkout@v4 |
| 56 | + |
| 57 | + - name: Set up Python |
| 58 | + uses: actions/setup-python@v5 |
| 59 | + with: |
| 60 | + python-version: ${{ matrix.python-version }} |
| 61 | + architecture: x64 |
| 62 | + cache: 'pip' |
| 63 | + cache-dependency-path: | |
| 64 | + requirements.txt |
| 65 | + application/records/requirements.txt |
| 66 | + application/records/requirements-dev.txt |
| 67 | +
|
| 68 | + - name: Install utilities |
| 69 | + run: | |
| 70 | + pip install -r requirements.txt |
| 71 | +
|
| 72 | + - name: Validate application/records |
| 73 | + run: | |
| 74 | + ngr test --accept-no-venv application/records |
0 commit comments