-
Notifications
You must be signed in to change notification settings - Fork 12
89 lines (75 loc) · 2.51 KB
/
Copy pathnetcoresync_moor_build.yml
File metadata and controls
89 lines (75 loc) · 2.51 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
full-build:
name: "Build netcoresync_moor"
runs-on: ubuntu-20.04
services:
postgres_svc:
image: postgres:13.4
env:
POSTGRES_DB: NETCoreSyncServerTimeStampDB
POSTGRES_USER: NETCoreSyncServerTimeStamp_User
POSTGRES_PASSWORD: NETCoreSyncServerTimeStamp_Password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
defaults:
run:
working-directory: netcoresync_moor
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Echo the Postgres service ID / Network / Ports
run: |
echo "id: ${{ job.services.postgres_svc.id }}"
echo "network: ${{ job.services.postgres_svc.network }}"
echo "ports: ${{ job.services.postgres_svc.ports }}"
- name: Use custom sqlite3
run: |
mkdir -p /tmp/sqlite/out
cp test/dylib/sqlite3/linux/* /tmp/sqlite/out/
chmod a+x /tmp/sqlite/out/sqlite3
echo "/tmp/sqlite/out" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/tmp/sqlite/out" >> $GITHUB_ENV
- name: Check sqlite3 version
run: sqlite3 --version
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze
- name: Generator for tests
run: dart run build_runner build --delete-conflicting-outputs
- name: Prepare coverage tools
run: |
sudo apt-get update -y
sudo apt-get install -y lcov
dart pub global activate coverage
echo "$HOME/.pub_cache/bin" >> $GITHUB_PATH
- name: Tests
run: dart test --coverage=coverage
env:
NETCORESYNCSERVER_POSTGRES_HOST: localhost
- name: Collect coverage
run: |
format_coverage --lcov --in=coverage --out=lcov.info --packages=.packages --report-on=lib
mv lcov.info coverage/lcov.info
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true
verbose: true