Skip to content

Commit

Permalink
ci: Add github actions
Browse files Browse the repository at this point in the history
Add actions
- CompatHelper: Checks for dependency upgrades
- Tagbot: Checks tags to release new versions
- ci.yml: Run tests and coverage on ubuntu/windows/osx x64

Test on nightly Julia when https://github.com/actions/toolkit/issues/399
is resolved.
  • Loading branch information
musoke committed Nov 11, 2020
1 parent 0b1b56f commit 2e71bdf
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == ''
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI
on:
- push
- pull_request
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.4'
- '1.5'
# - 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-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
- uses: julia-actions/julia-uploadcoveralls@v1
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: doctest
using JultraDark
doctest(JultraDark)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://musoke.github.io/JultraDark.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://musoke.github.io/JultraDark.jl/dev)
[![Build Status](https://github.com/musoke/JultraDark.jl/workflows/CI/badge.svg)](https://github.com/musoke/JultraDark.jl/actions)
[![Build Status](https://travis-ci.org/musoke/JultraDark.jl.svg?branch=master)](https://travis-ci.org/musoke/JultraDark.jl)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/musoke/JultraDark.jl?svg=true)](https://ci.appveyor.com/project/musoke/JultraDark-jl)
[![Codecov](https://codecov.io/gh/musoke/JultraDark.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/musoke/JultraDark.jl)
Expand Down

0 comments on commit 2e71bdf

Please sign in to comment.