Skip to content

Commit f46a84f

Browse files
committed
2 parents 7d88037 + ed172dd commit f46a84f

2 files changed

Lines changed: 127 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# source: https://github.com/invenia/PkgTemplates.jl/blob/master/.github/workflows/CI.yml
2+
name: CI
3+
# Run on master, tags, or any pull request
4+
on:
5+
schedule:
6+
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
7+
push:
8+
branches: [master]
9+
tags: ["*"]
10+
pull_request:
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.6"
20+
os:
21+
- ubuntu-latest
22+
- macOS-latest
23+
- windows-latest
24+
arch:
25+
- x64
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.version }}
31+
arch: ${{ matrix.arch }}
32+
- uses: actions/cache@v2
33+
env:
34+
cache-name: cache-artifacts
35+
with:
36+
path: ~/.julia/artifacts
37+
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38+
restore-keys: |
39+
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
40+
${{ runner.os }}-${{ matrix.arch }}-test-
41+
${{ runner.os }}-${{ matrix.arch }}-
42+
${{ runner.os }}-
43+
- run: |
44+
julia --project=. -e '
45+
using Pkg
46+
Pkg.update()'
47+
- uses: julia-actions/julia-buildpkg@latest
48+
- run: |
49+
git config --global user.name Tester
50+
git config --global user.email te@st.er
51+
- uses: julia-actions/julia-runtest@latest
52+
- uses: julia-actions/julia-processcoverage@v1
53+
- uses: codecov/codecov-action@v1
54+
with:
55+
file: lcov.info
56+
57+
slack:
58+
name: Notify Slack Failure
59+
needs: test
60+
runs-on: ubuntu-latest
61+
if: always() && github.event_name == 'schedule'
62+
steps:
63+
- uses: technote-space/workflow-conclusion-action@v2
64+
- uses: voxmedia/github-action-slack-notify-build@v1
65+
if: env.WORKFLOW_CONCLUSION == 'failure'
66+
with:
67+
channel: nightly-dev
68+
status: FAILED
69+
color: danger
70+
env:
71+
SLACK_BOT_TOKEN: ${{ secrets.DEV_SLACK_BOT_TOKEN }}
72+
73+
docs:
74+
name: Documentation
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v2
78+
- uses: julia-actions/setup-julia@v1
79+
with:
80+
version: '1.6'
81+
- run: | # add unregistered packages first
82+
julia --project=docs -e '
83+
using Pkg
84+
pkg"add https://github.com/OpenMendel/SnpArrays.jl"
85+
pkg"add https://github.com/OpenMendel/VarianceComponentModels.jl"
86+
pkg"add https://github.com/OpenMendel/OrdinalMultinomialModels.jl"'
87+
- run: |
88+
julia --project=docs -e '
89+
using Pkg
90+
Pkg.add("Documenter")
91+
Pkg.develop(PackageSpec(path=pwd()))
92+
Pkg.instantiate()'
93+
- run: |
94+
julia --project=docs -e '
95+
using Documenter: doctest
96+
using TraitSimulation
97+
doctest(TraitSimulation)'
98+
- run: julia --project=docs docs/make.jl
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Install CompatHelper"
11+
run: |
12+
import Pkg
13+
name = "CompatHelper"
14+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
15+
version = "2"
16+
Pkg.add(; name, uuid, version)
17+
shell: julia --color=yes {0}
18+
- name: "Run CompatHelper"
19+
run: |
20+
import CompatHelper
21+
CompatHelper.main()
22+
shell: julia --color=yes {0}
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
26+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

0 commit comments

Comments
 (0)