-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new script, `.github/ubuntu/all-apt-prereqs.sh`, to install all apt packages at once, and teach each of the engine scripts not to install apt packages when `SKIP_DEPENDS` is set. Also have the Postgres an SQLite scripts fall back on a default version to install if one is not passed. Remove the old `prereqs.sh`. And have the SQLite script install SQLite into `/opt/sqlite` to be more like the other engine installers, and have it and the Oracle script properly share the `LD_LIBRARY_PATH` variable. The new workflow, `.github/workflows/coverage.yml`, sets up all of the services and clients, as well as modules for reporting coverage to Coveralls, and runs the tests. Now that it uses a script installed in `local/bin`, teach all the workflows to cache all of `local`, not just `local/lib`. Get Oracle 21 tests working, too. Thanks to @gvenzl's help in gvenzl/oci-oracle-xe#45. Remove `.travis.yml` and references to it. Travis testing has not worked for a while, and is no more. Have `prove` run tests in parallel in 4 processes where it runs multiple tests, so that builds finish more quickly. Add build and release badges to README.md, and move most links to the bottom of the text for better plain text legibility. Most of the GitHub badges don't handle the Emoji correctly, but hopefully that will be addressed before long. Finally, add a call to `disconnect` to `t/oracle.t` to prevent a segfault that Devel::Cover seems to induce in DBD::Oracle (see perl5-dbi/DBD-Oracle#111).
- Loading branch information
Showing
27 changed files
with
286 additions
and
360 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set -e | ||
|
||
sudo apt-get update -qq | ||
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -qq \ | ||
libicu-dev gettext aspell-en software-properties-common \ | ||
curl unixodbc-dev odbcinst unixodbc \ | ||
default-jre \ | ||
firebird-dev firebird3.0-utils \ | ||
mysql-client default-libmysqlclient-dev \ | ||
libarchive-tools | ||
cat t/odbc/odbcinst.ini | sudo tee -a /etc/odbcinst.ini |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# This workflow creates the services and installs the clients in order to run | ||
# coverage tests. Each engine must be accessible for a complete coverage report. | ||
# It runs for pushes and pull requests on the main and develop branches. | ||
name: 📈 Coverage | ||
on: | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
jobs: | ||
Snowflake: | ||
name: 📈 Coverage | ||
runs-on: ubuntu-latest | ||
services: | ||
exasol: | ||
image: exasol/docker-db:latest | ||
ports: [ 8563 ] | ||
options: --privileged | ||
firebird: | ||
image: jacobalberty/firebird:latest | ||
ports: [ 3050 ] | ||
env: | ||
ISC_PASSWORD: nix | ||
FIREBIRD_DATABASE: sqitchtest.db | ||
mysql: | ||
image: mysql:latest | ||
env: { MYSQL_ALLOW_EMPTY_PASSWORD: yes } | ||
ports: [ 3306 ] | ||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | ||
oracle: | ||
image: gvenzl/oracle-xe:latest | ||
ports: [ 1521 ] | ||
env: | ||
ORACLE_PASSWORD: oracle | ||
APP_USER: sqitchtest | ||
APP_USER_PASSWORD: sqitchtest | ||
options: >- | ||
--health-cmd healthcheck.sh | ||
--health-interval 20s | ||
--health-timeout 10s | ||
--health-retries 10 | ||
vertica: | ||
image: vertica/vertica-ce:latest | ||
ports: [ 5433 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Clients | ||
env: | ||
SKIP_DEPENDS: true | ||
run: | | ||
.github/ubuntu/all-apt-prereqs.sh | ||
.github/ubuntu/exasol.sh | ||
.github/ubuntu/firebird.sh | ||
.github/ubuntu/mysql.sh | ||
.github/ubuntu/oracle.sh | ||
.github/ubuntu/pg.sh | ||
.github/ubuntu/snowflake.sh | ||
.github/ubuntu/vertica.sh | ||
- name: Setup Perl | ||
id: perl | ||
uses: shogo82148/actions-setup-perl@v1 | ||
with: { perl-version: latest } | ||
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
with: | ||
file-url: https://fastapi.metacpan.org/source/DWHEELER/App-Sqitch-v1.1.0/dist/cpanfile | ||
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends --cpanfile cpanfile | ||
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends DBI DBD::ODBC DBD::Firebird DBD::Oracle DBD::mysql DBD::Pg Devel::Cover Devel::Cover::Report::Coveralls Algorithm::Backoff::Exponential | ||
- name: Install SQLite | ||
env: { PERL5LIB: "${{ github.workspace }}/local/lib/perl5" } | ||
run: .github/ubuntu/sqlite.sh | ||
- name: Run Tests | ||
env: | ||
PERL5LIB: "${{ github.workspace }}/local/lib/perl5" | ||
HARNESS_PERL_SWITCHES: -MDevel::Cover=-ignore,^(?:x?t|inc|bin|local)/ | ||
LIVE_EXASOL_REQUIRED: true | ||
SQITCH_TEST_EXASOL_URI: db:exasol://sys:[email protected]:${{ job.services.exasol.ports[8563] }}/?Driver=Exasol;SSLCertificate=SSL_VERIFY_NONE | ||
LIVE_FIREBIRD_REQUIRED: true | ||
SQITCH_TEST_FIREBIRD_URI: db:firebird://sysdba:[email protected]:${{ job.services.firebird.ports[3050] }}//firebird/data/sqitchtest.db | ||
LIVE_MYSQL_REQUIRED: true | ||
SQITCH_TEST_MYSQL_URI: "db:mysql://[email protected]:${{ job.services.mysql.ports[3306] }}/information_schema" | ||
LIVE_ORACLE_REQUIRED: true | ||
SQITCH_TEST_ALT_ORACLE_REGISTRY: dbsnmp | ||
SQITCH_TEST_ORACLE_URI: db:oracle://system:[email protected]:${{ job.services.oracle.ports[1521] }}/XE | ||
LIVE_PG_REQUIRED: true | ||
SQITCH_TEST_PG_URI: db:pg://postgres@/postgres | ||
LIVE_SNOWFLAKE_REQUIRED: true | ||
SQITCH_TEST_SNOWFLAKE_URI: db:snowflake://${{ secrets.SNOWFLAKE_USERNAME }}:${{ secrets.SNOWFLAKE_PASSWORD }}@sra81677.us-east-1/sqitchtest?Driver=Snowflake;warehouse=compute_wh | ||
LIVE_SQLITE_REQUIRED: true | ||
LIVE_VERTICA_REQUIRED: true | ||
SQITCH_TEST_VSQL_URI: db:vertica://dbadmin@localhost:${{ job.services.vertica.ports[5433] }}/VMart?Driver=Vertica | ||
run: prove -lrj4 t | ||
- name: Report Coverage | ||
env: | ||
PERL5LIB: "${{ github.workspace }}/local/lib/perl5" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: local/bin/cover -report coveralls |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,19 +39,17 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
with: | ||
file-url: https://fastapi.metacpan.org/source/DWHEELER/App-Sqitch-v1.1.0/dist/cpanfile | ||
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends --cpanfile cpanfile | ||
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends DBD::Firebird | ||
env: { FIREBIRD_HOME: /usr } | ||
- name: prove | ||
env: | ||
PERL5LIB: "${{ github.workspace }}/local/lib/perl5" | ||
LIVE_FIREBIRD_REQUIRED: true | ||
FIREBIRD_HOME: /usr | ||
SQITCH_TEST_FIREBIRD_URI: db:firebird://sysdba:[email protected]:${{ job.services.firebird.ports[3050] }}//firebird/data/sqitchtest.db | ||
run: prove -lvr t/firebird.t |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,12 @@ jobs: | |
# In 11g, APP_USER "sqitchtest" is created in XE, but in more recent | ||
# versions it is created in the XEPDB1 pluggable database, which we | ||
# cannot connect to using a URI. So we use an existing user in those | ||
# versions. | ||
# versions. Uncomment code in skip_unless in t/oracle.t to find other | ||
# user schemas that will work. | ||
# * Image Source: https://github.com/gvenzl/oci-oracle-xe/ | ||
# * Image Issue: https://github.com/gvenzl/oci-oracle-xe/issues/46 | ||
# * DBD::Oracle Issue: https://github.com/perl5-dbi/DBD-Oracle/issues/131 | ||
# - { version: 21c, tag: 21-full, service: XE, altUser: gsmuser } | ||
- { version: 21c, tag: 21, service: XE, altUser: dbsnmp } | ||
- { version: 18c, tag: 18-slim, service: XE, altUser: gsmuser } | ||
- { version: 11g, tag: 11-slim, service: XE, altuser: sqitchtest } | ||
name: "🔮 Oracle ${{ matrix.version }}" | ||
|
@@ -38,7 +39,6 @@ jobs: | |
--health-timeout 10s | ||
--health-retries 10 | ||
steps: | ||
- run: "echo Filter: ${{ needs.filter.outputs.oracle }}" | ||
- uses: actions/checkout@v2 | ||
- name: Setup Clients | ||
run: .github/ubuntu/oracle.sh | ||
|
@@ -49,7 +49,7 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
|
@@ -37,4 +37,4 @@ jobs: | |
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends Test::Spelling Test::Pod Test::Pod::Coverage | ||
- name: prove | ||
env: { PERL5LIB: "${{ github.workspace }}/local/lib/perl5" } | ||
run: prove -lr --comments --directives | ||
run: prove -lrj4 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
|
@@ -41,4 +41,4 @@ jobs: | |
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends Test::Spelling Test::Pod Test::Pod::Coverage | ||
- name: prove | ||
env: { PERL5LIB: "${{ github.workspace }}/local/lib/perl5" } | ||
run: prove -lr --comments --directives | ||
run: prove -lrj4 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
- name: Cache CPAN Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: local/lib | ||
path: local | ||
key: perl-${{ steps.perl.outputs.perl-hash }} | ||
- name: Download cpanfile | ||
uses: carlosperate/[email protected] | ||
|
Oops, something went wrong.