Skip to content

Commit ca39b63

Browse files
committed
CI: Update CI pipeline
1 parent 1ce6283 commit ca39b63

File tree

2 files changed

+28
-60
lines changed

2 files changed

+28
-60
lines changed

.github/workflows/CI.yml

+24-56
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,47 @@
11
name: CI
2-
3-
# Run on master, tags, or any pull request
42
on:
53
push:
6-
branches: [master]
7-
tags: ["*"]
4+
branches:
5+
- master
6+
tags: ['*']
87
pull_request:
9-
8+
workflow_dispatch:
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1014
jobs:
1115
test:
12-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1317
runs-on: ${{ matrix.os }}
1418
strategy:
1519
fail-fast: false
1620
matrix:
1721
version:
1822
- '1.6'
19-
- '1' # Latest Release
23+
- '1'
2024
os:
2125
- ubuntu-latest
22-
- windows-latest
2326
- macos-latest
27+
- windows-latest
2428
arch:
2529
- x64
26-
30+
- x86
31+
exclude:
32+
- os: macos-latest
33+
arch: x86
2734
steps:
28-
- uses: actions/checkout@v2
29-
- uses: julia-actions/setup-julia@v1
35+
- uses: actions/checkout@v4
36+
- uses: julia-actions/setup-julia@v2
3037
with:
3138
version: ${{ matrix.version }}
3239
arch: ${{ matrix.arch }}
33-
- uses: actions/cache@v1
34-
env:
35-
cache-name: cache-artifacts
36-
with:
37-
path: ~/.julia/artifacts
38-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
39-
restore-keys: |
40-
${{ runner.os }}-test-${{ env.cache-name }}-
41-
${{ runner.os }}-test-
42-
${{ runner.os }}-
43-
- uses: julia-actions/julia-buildpkg@latest
44-
- run: |
45-
git config --global user.name Tester
46-
git config --global user.email [email protected]
47-
- uses: julia-actions/julia-runtest@latest
40+
- uses: julia-actions/cache@v2
41+
- uses: julia-actions/julia-buildpkg@v1
42+
- uses: julia-actions/julia-runtest@v1
4843
- uses: julia-actions/julia-processcoverage@v1
49-
- uses: codecov/codecov-action@v1
44+
- uses: codecov/codecov-action@v4
5045
with:
51-
file: lcov.info
52-
53-
# ATM, we only have README
54-
#
55-
# docs:
56-
# name: Documentation
57-
# runs-on: ubuntu-latest
58-
# steps:
59-
# - uses: actions/checkout@v2
60-
# - uses: julia-actions/setup-julia@v1
61-
# with:
62-
# version: '1'
63-
# - run: |
64-
# git config --global user.name name
65-
# git config --global user.email email
66-
# git config --global github.user username
67-
# - run: |
68-
# julia --project=docs -e '
69-
# using Pkg;
70-
# Pkg.develop(PackageSpec(path=pwd()));
71-
# Pkg.instantiate();'
72-
# - run: |
73-
# julia --project=docs -e '
74-
# using Documenter: doctest
75-
# using TimeSeries
76-
# doctest(TimeSeries)'
77-
# - run: julia --project=docs docs/make.jl
78-
# env:
79-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
files: lcov.info

test/runtests.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ end
132132
nu1 = svmtrain(X, y, svmtype = NuSVR, cost = 10.,
133133
nu = .7, gamma = 2., tolerance = .001)
134134
ynu1, d = svmpredict(nu1, X)
135-
@test sum(ynu1 - y) 14.184665717092
135+
@test isapprox(sum(ynu1 - y), 14.184665717092, atol=0.001)
136136
sknu1 = fit!(NuSVR(cost = 10., nu=.7, gamma = 2.), X', y)
137137
ysknu1 = predict(sknu1, X')
138138
@test isapprox(ysknu1,ynu1)
139139

140140
nu2 = svmtrain(X, y, svmtype = NuSVR, cost = 10., nu = .9)
141-
ynu2, d =svmpredict(nu2, X)
142-
@test sum(ynu2 - y) 6.686819661799177
141+
ynu2, d = svmpredict(nu2, X)
142+
@test isapprox(sum(ynu2 - y), 6.686819661799177, atol=0.01)
143143
sknu2 = fit!(NuSVR(cost = 10., nu=.9), X', y)
144144
ysknu2 = predict(sknu2, X')
145145
@test isapprox(ysknu2, ynu2)
@@ -150,7 +150,7 @@ end
150150
nu = .7, gamma = 2., tolerance = .001,
151151
nt = -1)
152152
ntynu1, ntd = svmpredict(ntnu1, X)
153-
@test sum(ntynu1 - y) 14.184665717092
153+
@test isapprox(sum(ntynu1 - y), 14.184665717092, atol=0.001)
154154

155155
# Assign by environment
156156
ENV["OMP_NUM_THREADS"] = 2

0 commit comments

Comments
 (0)