We will run tests locally

This commit is contained in:
Armen Zambrano G 2021-09-08 15:09:30 -04:00
parent 224ccd8c76
commit b999a5c9ef

View File

@ -138,23 +138,20 @@ jobs:
path: | path: |
dist/*/*${{ matrix.platform }}.whl dist/*/*${{ matrix.platform }}.whl
# This only uploads the arm64 wheels for Apple M1 silicon usage # This only uploads the arm64 wheels for Apple M1 Silicon usage
build-macos-arm64: build-macos-arm64:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [macos-10.15, macos-11.0] os: [macos-10.15, macos-11.0]
name: "build-${{ matrix.os }} - arm64)" name: "build-${{ matrix.os }} - arm64"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install pre-requisites - name: Install pre-requisites
run: | run: |
# brew install gnu-sed postgresql@13
brew install postgresql@13 brew install postgresql@13
brew services start postgresql brew services start postgresql
# gsed -i "s/^setup(name=\"psycopg2\"/setup(name=\"psycopg2-binary\"/" setup.py
# git diff
# This builds all possible Python versions (currently, 3.8 to 3.10) # This builds all possible Python versions (currently, 3.8 to 3.10)
- uses: pypa/cibuildwheel@v2.1.1 - uses: pypa/cibuildwheel@v2.1.1
@ -163,18 +160,9 @@ jobs:
# Read about options here https://cibuildwheel.readthedocs.io/en/stable/options # Read about options here https://cibuildwheel.readthedocs.io/en/stable/options
env: env:
CIBW_ARCHS: arm64 CIBW_ARCHS: arm64
# This allows substitution within setup.py
PACKAGE_NAME: psycopg2-binary PACKAGE_NAME: psycopg2-binary
- name: Some tests
run: |
git diff
ls -l dist
pip install psycopg2-binary --no-index -f dist/
python -c "import psycopg2; print(psycopg2.__version__)"
python -c "import psycopg2; print(psycopg2.__libpq_version__)"
python -c "import psycopg2; print(psycopg2.extensions.libpq_version())"
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with: