Smoke Tests #53
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: Smoke Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| concurrency: | |
| group: smoke-tests-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| services: | |
| cubrid: | |
| image: cubrid/cubrid:11.2 | |
| env: | |
| CUBRID_DB: testdb | |
| ports: | |
| - 33000:33000 | |
| options: >- | |
| --health-cmd "csql -u dba testdb -c 'SELECT 1'" | |
| --health-interval 15s | |
| --health-timeout 10s | |
| --health-retries 10 | |
| --health-start-period 30s | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install pycubrid sqlalchemy sqlalchemy-cubrid | |
| - name: Wait for CUBRID readiness | |
| run: | | |
| for i in $(seq 1 30); do | |
| if python -c " | |
| from pycubrid import connect | |
| try: | |
| conn = connect('CUBRID:localhost:33000:testdb:::', user='dba', password='') | |
| cur = conn.cursor() | |
| cur.execute('SELECT 1') | |
| cur.close() | |
| conn.close() | |
| print('CUBRID ready') | |
| exit(0) | |
| except Exception as e: | |
| print(f'Not ready: {e}') | |
| exit(1) | |
| "; then | |
| break | |
| fi | |
| echo "Waiting... ($i/30)" | |
| sleep 5 | |
| done | |
| - name: Run make verify | |
| run: make verify |