Support SAV publication without hard links #312
Workflow file for this run
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 | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| OPENSTATSPEC_SPECIFICATION_DIR: ${{ github.workspace }}/openstatspec-specification | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Checkout OpenStatSpec specification fixtures | |
| uses: actions/checkout@v7 | |
| with: &specification-checkout | |
| repository: OpenStatSpec/specification | |
| ref: 5b62bce1d2f4d719ac6ca42d73f07e7a127c7093 | |
| path: openstatspec-specification | |
| - name: Checkout required SPSS engine | |
| uses: actions/checkout@v7 | |
| with: &engine-checkout | |
| repository: TonisOrmisson/pyspssio | |
| ref: e069adf33c70bcd9e8e6ee495106479463a84fa2 | |
| path: openstatspec-pyspssio | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: python -m pip install --upgrade pip | |
| - run: python -m pip install ./openstatspec-specification | |
| - run: python -m pip install ./openstatspec-pyspssio | |
| - run: python -m pip install -e ".[dev]" | |
| - run: python -m pytest -m "not services" | |
| package-smoke: | |
| name: Build and install package artifact | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Checkout OpenStatSpec specification fixtures | |
| uses: actions/checkout@v7 | |
| with: *specification-checkout | |
| - name: Checkout required SPSS engine | |
| uses: actions/checkout@v7 | |
| with: *engine-checkout | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| - run: python -m pip install --upgrade pip build | |
| - run: python -m build | |
| - run: python -m venv /tmp/openstatspec-wheel-smoke | |
| - run: /tmp/openstatspec-wheel-smoke/bin/python -m pip install ./openstatspec-specification | |
| - run: /tmp/openstatspec-wheel-smoke/bin/python -m pip install ./openstatspec-pyspssio | |
| - run: /tmp/openstatspec-wheel-smoke/bin/python -m pip install dist/*.whl | |
| - run: /tmp/openstatspec-wheel-smoke/bin/openstatspec capabilities | |
| postgres-integration: | |
| name: PostgreSQL ${{ matrix.postgres }} integration | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| postgres: ["17.10", "18.4"] | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgres }} | |
| ports: ["5432:5432"] | |
| env: | |
| POSTGRES_DB: openstatspec | |
| POSTGRES_USER: openstatspec | |
| POSTGRES_PASSWORD: openstatspec | |
| options: >- | |
| --health-cmd "pg_isready -U openstatspec -d openstatspec" | |
| --health-interval 10s --health-timeout 5s --health-retries 5 | |
| env: | |
| OPENSTATSPEC_POSTGRES_URL: postgresql+psycopg://openstatspec:openstatspec@localhost:5432/openstatspec | |
| OPENSTATSPEC_EXPECTED_POSTGRES_VERSION: ${{ matrix.postgres }} | |
| steps: &sql-test-steps | |
| - uses: actions/checkout@v7 | |
| - name: Checkout OpenStatSpec specification fixtures | |
| uses: actions/checkout@v7 | |
| with: *specification-checkout | |
| - name: Checkout required SPSS engine | |
| uses: actions/checkout@v7 | |
| with: *engine-checkout | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| - run: python -m pip install --upgrade pip | |
| - run: python -m pip install ./openstatspec-specification | |
| - run: python -m pip install ./openstatspec-pyspssio | |
| - run: python -m pip install -e ".[dev,sql]" | |
| - run: python -m pytest -m services | |
| mysql-integration: | |
| name: MySQL ${{ matrix.mysql }} integration | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mysql: ["8.4.11", "9.7.2"] | |
| services: | |
| mysql: | |
| image: mysql:${{ matrix.mysql }} | |
| ports: ["3306:3306"] | |
| env: | |
| MYSQL_DATABASE: openstatspec | |
| MYSQL_USER: openstatspec | |
| MYSQL_PASSWORD: openstatspec | |
| MYSQL_ROOT_PASSWORD: root | |
| options: >- | |
| --health-cmd "mysqladmin ping -h 127.0.0.1 -uopenstatspec -popenstatspec" | |
| --health-interval 10s --health-timeout 5s --health-retries 10 | |
| env: | |
| OPENSTATSPEC_MYSQL_URL: mysql+pymysql://openstatspec:openstatspec@localhost:3306/openstatspec | |
| OPENSTATSPEC_EXPECTED_MYSQL_VERSION: ${{ matrix.mysql }} | |
| steps: *sql-test-steps | |
| mariadb-integration: | |
| name: MariaDB ${{ matrix.mariadb }} integration | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mariadb: ["11.4.12", "11.8.8", "12.3.2"] | |
| services: | |
| mariadb: | |
| image: mariadb:${{ matrix.mariadb }} | |
| ports: ["3306:3306"] | |
| env: | |
| MARIADB_DATABASE: openstatspec | |
| MARIADB_USER: openstatspec | |
| MARIADB_PASSWORD: openstatspec | |
| MARIADB_ROOT_PASSWORD: root | |
| options: >- | |
| --health-cmd "healthcheck.sh --connect --innodb_initialized" | |
| --health-interval 10s --health-timeout 5s --health-retries 10 | |
| env: | |
| OPENSTATSPEC_MARIADB_URL: mysql+pymysql://openstatspec:openstatspec@localhost:3306/openstatspec | |
| OPENSTATSPEC_EXPECTED_MARIADB_VERSION: ${{ matrix.mariadb }} | |
| steps: *sql-test-steps | |
| dolt-integration: | |
| name: Dolt ${{ matrix.dolt }} read-only / fail-closed integration | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - dolt: "2.2.2" | |
| image: dolthub/dolt:2.2.2@sha256:ae85afdd95317f0a982cab87fa3092a5a2e6689bc5de822ad7ae4f65b86d39a1 | |
| - dolt: "2.2.3" | |
| image: dolthub/dolt:2.2.3@sha256:1a651e738a2e7275b9c69fec8c5f42c6e23954314405c412f4dc9287ee7c0080 | |
| env: | |
| OPENSTATSPEC_DOLT_URL: mysql+pymysql://openstatspec:openstatspec@127.0.0.1:13308/openstatspec | |
| OPENSTATSPEC_EXPECTED_DOLT_VERSION: ${{ matrix.dolt }} | |
| OPENSTATSPEC_DOLT_IMAGE: ${{ matrix.image }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Checkout OpenStatSpec specification fixtures | |
| uses: actions/checkout@v7 | |
| with: *specification-checkout | |
| - name: Checkout required SPSS engine | |
| uses: actions/checkout@v7 | |
| with: *engine-checkout | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| - name: Initialize Dolt ${{ matrix.dolt }} | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/openstatspec-dolt" | |
| docker run --rm \ | |
| --volume "$RUNNER_TEMP/openstatspec-dolt:/var/lib/dolt" \ | |
| --workdir /var/lib/dolt \ | |
| "$OPENSTATSPEC_DOLT_IMAGE" init \ | |
| --name "OpenStatSpec CI" --email "ci@openstatspec.org" | |
| docker run --rm \ | |
| --volume "$RUNNER_TEMP/openstatspec-dolt:/var/lib/dolt" \ | |
| --workdir /var/lib/dolt \ | |
| "$OPENSTATSPEC_DOLT_IMAGE" sql \ | |
| -q "CREATE DATABASE openstatspec" | |
| docker run --rm \ | |
| --volume "$RUNNER_TEMP/openstatspec-dolt:/var/lib/dolt" \ | |
| --workdir /var/lib/dolt \ | |
| "$OPENSTATSPEC_DOLT_IMAGE" sql \ | |
| -q "CREATE USER 'openstatspec'@'%' IDENTIFIED BY 'openstatspec'; GRANT ALL PRIVILEGES ON openstatspec.* TO 'openstatspec'@'%'" | |
| docker run --detach --name openstatspec-dolt \ | |
| --publish 127.0.0.1:13308:3306 \ | |
| --volume "$RUNNER_TEMP/openstatspec-dolt:/var/lib/dolt" \ | |
| --workdir /var/lib/dolt \ | |
| "$OPENSTATSPEC_DOLT_IMAGE" sql-server -H 0.0.0.0 -l warning | |
| - run: python -m pip install --upgrade pip | |
| - run: python -m pip install ./openstatspec-specification | |
| - run: python -m pip install ./openstatspec-pyspssio | |
| - run: python -m pip install -e ".[dev,sql]" | |
| - name: Wait for Dolt | |
| run: | | |
| python - <<'PY' | |
| import time | |
| import pymysql | |
| for attempt in range(30): | |
| try: | |
| connection = pymysql.connect( | |
| host="127.0.0.1", | |
| port=13308, | |
| user="openstatspec", | |
| password="openstatspec", | |
| database="openstatspec", | |
| ) | |
| except pymysql.MySQLError: | |
| if attempt == 29: | |
| raise | |
| time.sleep(2) | |
| else: | |
| connection.close() | |
| break | |
| PY | |
| - run: python -m pytest -m "services and not candidate_evidence" | |
| - name: Show Dolt logs on failure and stop server | |
| if: always() | |
| run: | | |
| if docker inspect openstatspec-dolt >/dev/null 2>&1; then | |
| if [ "${{ job.status }}" != "success" ]; then | |
| docker logs openstatspec-dolt | |
| fi | |
| docker rm --force openstatspec-dolt | |
| fi |