Skip to content

github actions - to allow julia-actions/cache #94

github actions - to allow julia-actions/cache

github actions - to allow julia-actions/cache #94

Workflow file for this run

# https://github.com/julia-actions/cache#usage
name: CI
on: [push, pull_request]
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
env:
PGPASSWORD: postgres
MYSQL_HOST: 127.0.0.1
MYSQL_ROOT_PASWORD:
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: [nightly, 1.6.7]
runtests_with_coverage: [false]
julia-arch: [x64]
include:
- julia-version: 1.10.0
runtests_with_coverage: true
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: mysqltest
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Setup PostgreSQL
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
run: |
psql --version
netstat -nlp | grep 5432
psql -h localhost -U postgres -tc 'SHOW server_version'
psql -h localhost -U postgres -c '\conninfo'
psql -h localhost -U postgres -c "CREATE DATABASE postgresqltest;"
psql -h localhost -U postgres -c "CREATE DATABASE postgresqltest2;"
- name: Setup MySQL
run: |
mysql --version
mysqladmin -h 127.0.0.1 -uroot variables | grep socket
mysql -h 127.0.0.1 -uroot -e 'show variables like "socket";'
mysql -h 127.0.0.1 -uroot -e 'CREATE DATABASE IF NOT EXISTS mysqltest;'
mysql -h 127.0.0.1 -uroot -e 'GRANT ALL PRIVILEGES ON mysqltest.* TO "root"@"localhost"'
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
if: matrix.runtests_with_coverage == false
- name: runtests with coverage
if: matrix.runtests_with_coverage
run: |
julia --project=. -e 'using Pkg; Pkg.test(coverage=true)'
julia --project=. -e 'using Pkg; Pkg.add("Coverage"); using Coverage; cov = Coverage.process_folder(); mkdir("coverage"); Coverage.LCOV.writefile("coverage/lcov.info", cov)'
- uses: codecov/codecov-action@v1
###
### stuck on Precompiling LibPQ, DataFrames
###
# RunForMacOS:
# needs: Test
# if: github.event.ref == 'refs/heads/master'
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@master
# - name: runtests
# run: |
# julia --project=. -e 'using Pkg; Pkg.test()'
RunForWindows:
needs: Test
if: github.event.ref == 'refs/heads/master'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1