Skip to content

CI

CI #420

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * 1'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
oscript_version: ['1.8.3', 'stable']
steps:
- uses: actions/checkout@v4
- name: Setup Onescript Action
uses: otymko/[email protected]
with:
version: ${{ matrix.oscript_version }}
- name: Install dependencies
run: |
opm install [email protected]
opm install -l --dev
- name: Prepare macOS env
if: matrix.os == 'macos-13'
run: |
echo "SIGN_QEMU_BINARY=1" >> "$GITHUB_ENV"
- name: Install docker
uses: crazy-max/ghaction-setup-docker@v3
timeout-minutes: 12
- name: Setup PostgreSQL
shell: bash
run: |
docker run --rm --name postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USERNAME=postgres -e POSTGRES_DB=postgres -e POSTGRES_HOST_AUTH_METHOD=password --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 satrapu/postgresql
docker ps
while [ "`docker inspect -f {{.State.Health.Status}} postgres`" != "healthy" ]; do docker ps && sleep 2; done
docker ps
- name: Run tests
env:
TESTRUNNER_RUN_POSTGRES_TESTS: true
TESTRUNNER_RUN_SQLITE_TESTS: "${{ matrix.os == 'windows-latest' }}"
run: |
oscript ./tasks/test.os