Skip to content

Commit b9b2b62

Browse files
authored
Merge pull request #5 from invenia/massinstallaction/set-up-GitHubActions
MassInstallAction: Install the GitHubActions workflow on this repository
2 parents 3192dbf + 461cd7c commit b9b2b62

File tree

8 files changed

+148
-40
lines changed

8 files changed

+148
-40
lines changed

.github/workflows/CI.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
# Run on master, tags, or any pull request
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
6+
push:
7+
branches: [master]
8+
tags: ["*"]
9+
pull_request:
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- 1
19+
os:
20+
- ubuntu-latest
21+
- macOS-latest
22+
- windows-latest
23+
arch:
24+
- x64
25+
include:
26+
# Add a 1.0 job just to make sure we still support it
27+
- os: ubuntu-latest
28+
version: 1.0.5
29+
arch: x64
30+
# Add a 1.3 job because that's what Invenia actually uses
31+
- os: ubuntu-latest
32+
version: 1.3
33+
arch: x64
34+
# Add a 32-bit job to ensure we don't have any 64-bit specific logic
35+
- os: ubuntu-latest
36+
version: 1
37+
arch: x86
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: julia-actions/setup-julia@v1
41+
with:
42+
version: ${{ matrix.version }}
43+
arch: ${{ matrix.arch }}
44+
- uses: actions/cache@v1
45+
env:
46+
cache-name: cache-artifacts
47+
with:
48+
path: ~/.julia/artifacts
49+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
50+
restore-keys: |
51+
${{ runner.os }}-test-${{ env.cache-name }}-
52+
${{ runner.os }}-test-
53+
${{ runner.os }}-
54+
- uses: julia-actions/julia-buildpkg@latest
55+
- run: |
56+
git config --global user.name Tester
57+
git config --global user.email [email protected]
58+
- uses: julia-actions/julia-runtest@latest
59+
- uses: julia-actions/julia-processcoverage@v1
60+
- uses: codecov/codecov-action@v1
61+
with:
62+
file: lcov.info
63+
64+
slack:
65+
name: Notify Slack Failure
66+
needs: test
67+
runs-on: ubuntu-latest
68+
if: github.event == 'schedule'
69+
steps:
70+
- uses: technote-space/workflow-conclusion-action@v2
71+
- uses: voxmedia/github-action-slack-notify-build@v1
72+
if: env.WORKFLOW_CONCLUSION == 'failure'
73+
with:
74+
channel: nightly-dev
75+
status: FAILED
76+
color: danger
77+
env:
78+
SLACK_BOT_TOKEN: ${{ secrets.DEV_SLACK_BOT_TOKEN }}
79+
80+
docs:
81+
name: Documentation
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v2
85+
- uses: julia-actions/setup-julia@v1
86+
with:
87+
version: '1'
88+
- run: |
89+
git config --global user.name name
90+
git config --global user.email email
91+
git config --global github.user username
92+
- run: |
93+
julia --project=docs -e '
94+
using Pkg;
95+
Pkg.develop(PackageSpec(path=pwd()));
96+
Pkg.instantiate();
97+
include("docs/make.jl");'
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CompatHelper
22
on:
33
schedule:
4-
- cron: 0 0 * * *
4+
- cron: '0 0 * * *' # Everyday at midnight
55
workflow_dispatch:
66
jobs:
77
CompatHelper:

.github/workflows/JuliaNightly.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: JuliaNightly
2+
# Nightly Scheduled Julia Nightly Run
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
6+
jobs:
7+
test:
8+
name: Julia Nightly - Ubuntu - x64
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: julia-actions/setup-julia@v1
13+
with:
14+
version: nightly
15+
arch: x64
16+
- uses: actions/cache@v1
17+
env:
18+
cache-name: cache-artifacts
19+
with:
20+
path: ~/.julia/artifacts
21+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
22+
restore-keys: |
23+
${{ runner.os }}-test-${{ env.cache-name }}-
24+
${{ runner.os }}-test-
25+
${{ runner.os }}-
26+
- uses: julia-actions/julia-buildpkg@latest
27+
- run: |
28+
git config --global user.name Tester
29+
git config --global user.email [email protected]
30+
- uses: julia-actions/julia-runtest@latest
31+
- uses: julia-actions/julia-processcoverage@v1
32+
- uses: codecov/codecov-action@v1
33+
with:
34+
file: lcov.info

.github/workflows/TagBot.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 0 * * *
3+
issue_comment:
4+
types:
5+
- created
56
workflow_dispatch:
67
jobs:
78
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
810
runs-on: ubuntu-latest
911
steps:
1012
- uses: JuliaRegistries/TagBot@v1

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ authors = ["Invenia Technical Computing Corporation"]
44
version = "0.1.0"
55

66
[compat]
7+
Documenter = "0.23, 0.24"
78
julia = "1"
89

910
[extras]
11+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1012
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1113
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
1214

1315
[targets]
14-
test = ["Test", "YAML"]
16+
test = ["Documenter", "Test", "YAML"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://invenia.github.io/MultilineStrings.jl/stable)
44
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://invenia.github.io/MultilineStrings.jl/dev)
5-
[![Build Status](https://travis-ci.com/invenia/MultilineStrings.jl.svg?branch=master)](https://travis-ci.com/invenia/MultilineStrings.jl)
5+
[![CI](https://github.com/Invenia/MultilineStrings.jl/workflows/CI/badge.svg)](https://github.com/Invenia/MultilineStrings.jl/actions?query=workflow%3ACI)
66
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
77
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
88

@@ -53,4 +53,4 @@ with the non-magical computation occurring on this device.
5353
"""
5454
```
5555

56-
Take note that a Julia [triple-quoted string literal](https://docs.julialang.org/en/v1/manual/strings/#Triple-Quoted-String-Literals) will leave most newlines in place.
56+
Take note that a Julia [triple-quoted string literal](https://docs.julialang.org/en/v1/manual/strings/#Triple-Quoted-String-Literals) will leave most newlines in place.

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Documenter: doctest
2+
using MultilineStrings
13
using MultilineStrings: MultilineStrings, @m_str, multiline, interpolate
24
using Test
35
using YAML: YAML
@@ -26,6 +28,8 @@ const TEST_STRINGS = [
2628
"starting newline" => "\nbar",
2729
]
2830

31+
doctest(MultilineStrings)
32+
2933
# Validate `yaml_block` function
3034
for (test, str) in TEST_STRINGS
3135
@assert yaml_block(str, "|+") == str

0 commit comments

Comments
 (0)