Skip to content

enable testing for PyPy, fix error messages #9

enable testing for PyPy, fix error messages

enable testing for PyPy, fix error messages #9

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
- 2.1.x
pull_request:
branches:
- main
- 2.1.x
paths-ignore:
- "doc/**"
- "web/**"
permissions:
contents: read
defaults:
run:
shell: bash -el {0}
jobs:
ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 180
strategy:
matrix:
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml]
# Prevent the include jobs from overriding other jobs
pattern: [""]
include:
- name: "PyPy"
env_file: actions-pypy-39.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "--max-worker-restart 0"
fail-fast: false
name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }}
env:
PATTERN: ${{ matrix.pattern }}
EXTRA_APT: ${{ matrix.extra_apt || '' }}
LANG: ${{ matrix.lang || 'C.UTF-8' }}
LC_ALL: ${{ matrix.lc_all || '' }}
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
TEST_ARGS: ${{ matrix.test_args || '' }}
PYTEST_WORKERS: 'auto'
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}
cancel-in-progress: true
services:
mysql:
image: mysql:8.0.33
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: pandas
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
postgres:
image: postgres:13
env:
PGUSER: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pandas
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
moto:
image: motoserver/moto:4.1.13
env:
AWS_ACCESS_KEY_ID: foobar_key
AWS_SECRET_ACCESS_KEY: foobar_secret
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Extra installs
# xsel for clipboard tests
run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }}
- name: Generate extra locales
# These extra locales will be available for locale.setlocale() calls in tests
run: sudo locale-gen ${{ matrix.extra_loc }}
if: ${{ matrix.extra_loc }}
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
environment-file: ci/deps/${{ matrix.env_file }}
- name: Build Pandas
id: build
uses: ./.github/actions/build_pandas
- name: Test (not single_cpu)
uses: ./.github/actions/run-tests
if: ${{ matrix.name != 'PyPy' }}
env:
# Set pattern to not single_cpu if not already set
PATTERN: ${{ env.PATTERN == '' && 'not single_cpu' || matrix.pattern }}
- name: Test (single_cpu)
uses: ./.github/actions/run-tests
env:
PATTERN: 'single_cpu'
PYTEST_WORKERS: 0
if: ${{ (matrix.pattern == '' && (always() && steps.build.outcome == 'success')) || matrix.name == 'PyPy'}}