-
-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (42 loc) · 1.43 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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]
oscript_version: ['1.9.2', '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
opm install -l 1commands 1testrunner [email protected]
- name: Install docker
uses: docker/setup-docker-action@v4
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