Skip to content

Commit

Permalink
Merge pull request #2 from sjkelly/sjk/ci1
Browse files Browse the repository at this point in the history
Init CI
  • Loading branch information
GlenHertz committed Jun 21, 2022
2 parents 9dc9a56 + 4fe95c1 commit c172dcd
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 6 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
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.6'
- '1.7'
#- 'nightly'
os:
- ubuntu-latest
#- macOS-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: coverallsapp/github-action@master
with:
path-to-lcov: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}
parallel: true
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: DocMeta, doctest
using ScaledNumbersOutput
DocMeta.setdocmeta!(ScaledNumbersOutput, :DocTestSetup, :(using ScaledNumbersOutput); recursive=true)
doctest(ScaledNumbersOutput)'
- run: julia --project=docs docs/make.jl
env:
JULIA_PKG_SERVER: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
finish:
needs: test
if: always()
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
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 == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Manifest.toml
11 changes: 6 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ uuid = "782ee38f-53f4-49ed-a0ae-b2a4e296146b"
authors = ["Glen Hertz <glen.hertz@gmail.com>"]
version = "1.0.1"

[compat]
julia = "1.6, 1.7, 1.8, 1.9"
OrderedCollections = "1"

[deps]
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"

[compat]
OrderedCollections = "1"
julia = "1.6, 1.7, 1.8, 1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "Aqua"]
5 changes: 4 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ScaledNumbersOutput, Test
using ScaledNumbersOutput, Test, Aqua
@testset "SI" begin
@test to_SI(2.5e11) == "250G"
@test to_SI(2.5e10) == "25G"
Expand Down Expand Up @@ -50,4 +50,7 @@ using ScaledNumbersOutput, Test

@test to_SI(-2.5e-19) == "-2.5e-19"
@test to_SI(-2.5e19) == "-2.5e19"
end
@testset "Misc. QA" begin
Aqua.test_all(ScaledNumbersOutput)
end

0 comments on commit c172dcd

Please sign in to comment.