Skip to content

Commit

Permalink
Merge pull request #2 from alan-turing-institute/dilumaluthge-forks-m…
Browse files Browse the repository at this point in the history
…assinstallaction/set-up-CI

Dilumaluthge forks massinstallaction/set up ci
  • Loading branch information
ablaom authored Nov 29, 2020
2 parents 72da2d5 + 5db5119 commit 2e31da2
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 18 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI
on:
pull_request:
branches:
- master
- dev
push:
branches:
- master
- dev
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.3'
- '1'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Repository implementing MLJ interface for
[XGBoost](https://github.com/JuliaStats/XGBoost.jl) models.


[![Build Status](https://travis-ci.com/alan-turing-institute/MLJXGBoostInterface.jl.svg?branch=master)](https://travis-ci.com/github/alan-turing-institute/MLJXGBoostInterface.jl)
[![Build Status](https://github.com/alan-turing-institute/MLJXGBoostInterface.jl/workflows/CI/badge.svg)](https://github.com/alan-turing-institute/MLJXGBoostInterface.jl/actions)
[![Coverage](http://codecov.io/github/alan-turing-institute/MLJXGBoostInterface.jl/coverage.svg?branch=master)](https://codecov.io/gh/alan-turing-institute/MLJXGBoostInterface.jl)
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ misclassification_rate = sum(yhat .!= y[test])/length(test)

# check target pool preserved:
X = (x1=rand(rng, 400), x2=rand(rng, 400), x3=rand(rng, 400))
ycat = vcat(fill(:x, 100), fill(:y, 100), fill(:z, 200)) |>categorical
ycat = vcat(fill('x', 100), fill('y', 100), fill('z', 200)) |>categorical
y = identity.(ycat)
train, test = partition(eachindex(y), 0.5)
@test length(unique(y[train])) == 2
Expand Down

0 comments on commit 2e31da2

Please sign in to comment.