CI #777
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: | |
| schedule: | |
| # Run at an odd minute to improve odds of dependency installation success | |
| - cron: "19 11 * * *" | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| # Raku versions after 2020.12 (coercion redesign) function best | |
| raku-version: | |
| - 'latest' | |
| - '2022.12' | |
| - '2022.04' | |
| - '2021.04' | |
| postgres-image: | |
| - 'postgres:latest' | |
| mysql-image: | |
| - 'mysql:latest' | |
| # Check older database versions on the latest version of Raku only | |
| include: | |
| - raku-version: latest | |
| postgres-image: postgres:13 | |
| mysql-image: mysql:5.7 | |
| - raku-version: latest | |
| postgres-image: postgres:12 | |
| mysql-image: mariadb:10.6 | |
| - raku-version: latest | |
| postgres-image: postgres:11 | |
| mysql-image: mariadb:10.5 | |
| - raku-version: latest | |
| postgres-image: postgres:10 | |
| mysql-image: mariadb:10.4 | |
| # Services use containers and are not available on windows or macosx instances. | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: ${{ matrix.mysql-image }} | |
| env: | |
| MYSQL_DATABASE: dbdishtest | |
| MYSQL_HOST: localhost | |
| MYSQL_USER: testuser | |
| MYSQL_PASSWORD: testpass | |
| MYSQL_ROOT_PASSWORD: rootpassword | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| postgres: | |
| image: ${{ matrix.postgres-image }} | |
| env: | |
| POSTGRES_DB: dbiish | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v3 | |
| - uses: Raku/setup-raku@v1 | |
| with: | |
| raku-version: ${{ matrix.raku-version }} | |
| - name: Update apt | |
| run: sudo apt-get update | |
| # Debug information. This is mostly useful when the dependencies suddenly fail to install | |
| - name: Environment Information | |
| run: lsb_release -a | |
| # Install client libraries | |
| - name: Install native dependencies | |
| run: sudo apt-get install -y postgresql-client libpq-dev libmysqlclient-dev sqlite3 libsqlite3-dev sqlcipher libsqlcipher-dev | |
| # Raku image 2020.12 does not understand the fez module network. App::Prove only installs via fez | |
| - name: Upgrade Zef | |
| run: zef install zef --force-install | |
| - name: Install dependencies | |
| run: zef install --deps-only --/test --test-depends . | |
| - name: Install prove6 | |
| run: zef install --/test App::Prove6 | |
| - name: Install dependencies for extended tests | |
| run: zef install --/test JSON::Tiny Test::META | |
| - name: Run tests | |
| env: | |
| DBIISH_WRITE_TEST: YES | |
| MYSQL_HOST: 127.0.0.1 | |
| MYSQL_TCP_PORT: ${{ job.services.postgres.ports[3306] }} | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| PGPORT: ${{ job.services.postgres.ports[5432] }} | |
| PGDATABASE: postgres | |
| run: prove6 -I lib -v t | |