-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (56 loc) · 1.63 KB
/
dart.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
#env:
#DB_HOST: localhost
#DB_USERNAME: sisadmin
#DB_PASSWORD: s1sadm1n
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
sdk: [2.12.4]
#services:
#postgres:
#image: postgres:11
#env:
#POSTGRES_DB: banco_teste
#POSTGRES_PASSWORD: sisadmin
#POSTGRES_USER: s1sadm1n
#ports:
#- 5432:5432
# Set health checks to wait until postgres has started
#options: >-
# --health-cmd pg_isready
#--health-interval 10s
#--health-timeout 5s
# --health-retries 5
steps:
- name: Start PostgreSQL on Ubuntu
run: |
sudo systemctl start postgresql.service
pg_isready
- name: Create additional user
run: |
sudo -u postgres psql --command="CREATE ROLE sisadmin WITH LOGIN SUPERUSER PASSWORD 's1sadm1n'" --command="\du"
- name: Create additional database
run: |
sudo -u postgres createdb banco_teste --owner=sisadmin
PGPASSWORD=s1sadm1n
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart run test --concurrency 1 --chain-stack-traces