-
Notifications
You must be signed in to change notification settings - Fork 248
93 lines (75 loc) · 2.33 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
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
90
91
92
93
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow rebuilds via API.
repository_dispatch:
types: rebuild
env:
CACHE_NUMBER: 0 # increase to reset cache manually
concurrency:
group: run_tests-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/my-env
#- os: macos-latest
# label: osx-64
# prefix: /Users/runner/miniconda3/envs/my-env
#- os: windows-latest
# label: win-64
# prefix: C:\Miniconda3\envs\my-env
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment.yml
environment-name: mfa
extra-specs: |
python=3.9
- name: Configure mfa
shell: bash -l {0}
run: python -m montreal_forced_aligner configure --disable_auto_server
- name: Initialize database
shell: bash -l {0}
run: python -m montreal_forced_aligner server init -p test
- name: Check database config
shell: bash -l {0}
run: cat ~/Documents/MFA/pg_mfa_test/postgresql.conf
- name: Check init database log
shell: bash -l {0}
run: cat ~/Documents/MFA/pg_init_log_test.txt
- name: Check database start log
shell: bash -l {0}
run: cat ~/Documents/MFA/pg_log_test.txt
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.MFA_GITHUB_TOKEN }}
shell: bash -l {0}
run: pytest -x ./tests
- name: Stop database
shell: bash -l {0}
run: python -m montreal_forced_aligner server stop -p test
- name: Check init database log
shell: bash -l {0}
run: cat ~/Documents/MFA/pg_init_log_test.txt
- name: Check database start log
shell: bash -l {0}
run: cat ~/Documents/MFA/pg_log_test.txt
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v3"
with:
file: ./coverage.xml
fail_ci_if_error: false