Skip to content

Commit 784652e

Browse files
committed
Converted travis to github ci
1 parent a6451e3 commit 784652e

File tree

1 file changed

+156
-0
lines changed

1 file changed

+156
-0
lines changed

.github/workflows/ci.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: CI
2+
on:
3+
push:
4+
branch:
5+
- master
6+
- develop
7+
- release**
8+
tags:
9+
- v**
10+
11+
jobs:
12+
test:
13+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
version:
19+
- '1.5'
20+
- 'nightly'
21+
os:
22+
- ubuntu-latest
23+
arch:
24+
- x64
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Setup julia
30+
uses: julia-actions/setup-julia@v1
31+
with:
32+
version: ${{ matrix.version }}
33+
arch: ${{ matrix.arch }}
34+
35+
- name: Cache Artifacts
36+
uses: actions/cache@v1
37+
env:
38+
cache-name: cache-artifacts
39+
with:
40+
path: ~/.julia/artifacts
41+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
42+
restore-keys: |
43+
${{ runner.os }}-test-${{ env.cache-name }}-
44+
${{ runner.os }}-test-
45+
${{ runner.os }}-
46+
47+
- name: Julia Build Pkg
48+
uses: julia-actions/julia-buildpkg@latest
49+
50+
- name: Git Test Credentials
51+
run: |
52+
git config --global user.name Tester
53+
git config --global user.email [email protected]
54+
55+
- name: Run tests
56+
uses: julia-actions/julia-runtest@latest
57+
env:
58+
IIF_TEST: false
59+
SKIP_CGDFG_TESTS: true
60+
continue-on-error: ${{ matrix.version == 'nightly' }}
61+
62+
- name: Process Coverage
63+
uses: julia-actions/julia-processcoverage@v1
64+
65+
- name: Code Coverage
66+
uses: codecov/codecov-action@v1
67+
with:
68+
file: lcov.info
69+
# run: |
70+
# julia -e 'using Pkg; cd(Pkg.dir("DistributedFactorGraphs")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
71+
72+
test-cfg:
73+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/release**'
74+
name: Documentation
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v2
79+
80+
- name: Setup julia
81+
uses: julia-actions/setup-julia@v1
82+
with:
83+
version: 1.4
84+
arch: x64
85+
86+
- name: Install neo4j
87+
run: |
88+
sudo add-apt-repository -y ppa:openjdk-r/ppa
89+
sudo apt-get update
90+
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
91+
echo 'deb https://debian.neo4j.com stable 3.5' | sudo tee /etc/apt/sources.list.d/neo4j.list
92+
sudo apt-get update
93+
apt list -a neo4j
94+
sudo apt-get install neo4j
95+
sudo service neo4j start
96+
sleep 10
97+
curl -v POST http://neo4j:neo4j@localhost:7474/user/neo4j/password -d"password=test"
98+
# sudo neo4j-admin set-initial-password test
99+
curl -I http://localhost:7474/
100+
101+
- name: Cache Artifacts
102+
uses: actions/cache@v1
103+
env:
104+
cache-name: cache-artifacts
105+
with:
106+
path: ~/.julia/artifacts
107+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
108+
restore-keys: |
109+
${{ runner.os }}-test-${{ env.cache-name }}-
110+
${{ runner.os }}-test-
111+
${{ runner.os }}-
112+
113+
- name: Julia Build Pkg
114+
uses: julia-actions/julia-buildpkg@latest
115+
116+
- name: Git Test Credentials
117+
run: |
118+
git config --global user.name Tester
119+
git config --global user.email [email protected]
120+
121+
- name: Run tests
122+
uses: julia-actions/julia-runtest@latest
123+
env:
124+
IIF_TEST: true
125+
SKIP_CGDFG_TESTS: false
126+
127+
- name: Process Coverage
128+
uses: julia-actions/julia-processcoverage@v1
129+
130+
- name: Code Coverage
131+
uses: codecov/codecov-action@v1
132+
with:
133+
file: lcov.info
134+
# run: |
135+
# julia -e 'using Pkg; cd(Pkg.dir("DistributedFactorGraphs")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
136+
137+
docs:
138+
needs: test
139+
name: Documentation
140+
runs-on: ubuntu-latest
141+
continue-on-error: true
142+
steps:
143+
- name: Checkout
144+
uses: actions/checkout@v2
145+
146+
- name: Setup julia
147+
uses: julia-actions/setup-julia@v1
148+
with:
149+
version: 1.4
150+
arch: x64
151+
152+
- name: Documentation
153+
run: |
154+
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
155+
julia --project=docs/ docs/make.jl
156+

0 commit comments

Comments
 (0)