-
Notifications
You must be signed in to change notification settings - Fork 19
125 lines (118 loc) · 4.23 KB
/
runtests.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Run tests
on:
push:
branches:
- master
- testing/**
pull_request:
branches:
- master
workflow_dispatch:
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the master branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
# github services (for mongodb service) only works on linux
test-with-mongodb:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.julia-version == '1.11-nightly' || matrix.julia-version == 'nightly' }}
strategy:
matrix:
julia-version:
- '~1.6.0-0'
- '~1.10.0-0'
- '1.11-nightly'
- 'nightly'
os: ['ubuntu-latest']
cxxwrap: [ '' ]
fail-fast: false
# Service containers to run
services:
# Label used to access the service container
mongodb:
# Docker Hub image
image: mongo:6.0
# Provide the login data
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
ports:
# Maps tcp port 27017 on service container to the host
- 27017:27017
env:
JULIA_PKG_SERVER: ""
POLYDB_TEST_URI: "mongodb://admin:admin@localhost:27017/?authSource=admin"
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v1
with:
cache-name: julia-cache;workflow=${{ github.workflow }};julia=${{ matrix.julia-version }};arch=${{ runner.arch }}
include-matrix: false
cache-scratchspaces: false
- name: "pin CxxWrap"
if: matrix.cxxwrap != ''
run: julia --project -e 'using Pkg; pkg"add CxxWrap@${{ matrix.cxxwrap }}"; pkg"pin CxxWrap";'
- name: "Fill polyDB container"
run: |
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-database-tools
mongorestore --host localhost -u admin -p admin --port 27017 .github/polydb_dump
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: ./lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
# this one is only for macos, ubuntu is run with mongodb in the other job
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.julia-version == '1.11-nightly' || matrix.julia-version == 'nightly' }}
env:
JULIA_PKG_SERVER: ""
strategy:
matrix:
julia-version:
- '1.10'
- '1.11-nightly'
- 'nightly'
os: [ 'macos-14' ] # aarch64
include:
- os: 'macos-13' # x86_64
julia-version: '1.6'
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v1
with:
cache-name: julia-cache;workflow=${{ github.workflow }};julia=${{ matrix.julia-version }};arch=${{ runner.arch }}
include-matrix: false
cache-scratchspaces: false
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: ./lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}