Skip to content

Commit 1c24980

Browse files
authored
Merge pull request #319 from vtjnash/jn/github-actions
switch CI to GitHub Actions
2 parents 2987b15 + 1220949 commit 1c24980

File tree

6 files changed

+92
-89
lines changed

6 files changed

+92
-89
lines changed

.github/workflows/CI.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- '1.0'
19+
- '1'
20+
- 'nightly'
21+
os:
22+
- ubuntu-latest
23+
arch:
24+
- x64
25+
include:
26+
- version: '1'
27+
os: ubuntu-latest
28+
arch: x86
29+
- version: '1'
30+
os: windows-latest
31+
arch: x64
32+
- version: '1'
33+
os: macos-latest
34+
arch: x64
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: julia-actions/setup-julia@v1
38+
with:
39+
version: ${{ matrix.version }}
40+
arch: ${{ matrix.arch }}
41+
- uses: julia-actions/julia-buildpkg@v1
42+
- uses: julia-actions/julia-runtest@v1
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v1
45+
with:
46+
file: lcov.info

.github/workflows/TagBot.yml

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

.travis.yml

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

README.md

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

33
This package provides for parsing and printing JSON in pure Julia.
44

5-
[![Build Status](https://travis-ci.org/JuliaIO/JSON.jl.svg)](https://travis-ci.org/JuliaIO/JSON.jl)
6-
[![Build status](https://ci.appveyor.com/api/projects/status/2sfomjwl29k6y6oy)](https://ci.appveyor.com/project/staticfloat/json-jl)
5+
[![Build Status](https://github.com/JuliaIO/JSON.jl/workflows/CI/badge.svg)](https://github.com/JuliaIO/JSON.jl/actions/workflows/CI.yml?query=branch%3Amaster)
76
[![codecov.io](http://codecov.io/github/JuliaIO/JSON.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaIO/JSON.jl?branch=master)
87

98
## Installation

appveyor.yml

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

test/async.jl

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,49 @@
1+
using JSON
2+
using Test
3+
using Distributed: RemoteChannel
4+
5+
@isdefined(a) || include("json-samples.jl")
6+
17
finished_async_tests = RemoteChannel()
28

39
using Sockets
410

5-
@async begin
6-
s = listen(7777)
7-
s = accept(s)
8-
9-
Base.start_reading(s)
10-
11-
@test JSON.parse(s) != nothing # a
12-
@test JSON.parse(s) != nothing # b
13-
validate_c(s) # c
14-
@test JSON.parse(s) != nothing # d
15-
validate_svg_tviewer_menu(s) # svg_tviewer_menu
16-
@test JSON.parse(s) != nothing # gmaps
17-
@test JSON.parse(s) != nothing # colors1
18-
@test JSON.parse(s) != nothing # colors2
19-
@test JSON.parse(s) != nothing # colors3
20-
@test JSON.parse(s) != nothing # twitter
21-
@test JSON.parse(s) != nothing # facebook
22-
validate_flickr(s) # flickr
23-
@test JSON.parse(s) != nothing # youtube
24-
@test JSON.parse(s) != nothing # iphone
25-
@test JSON.parse(s) != nothing # customer
26-
@test JSON.parse(s) != nothing # product
27-
@test JSON.parse(s) != nothing # interop
28-
validate_unicode(s) # unicode
29-
@test JSON.parse(s) != nothing # issue5
30-
@test JSON.parse(s) != nothing # dollars
31-
@test JSON.parse(s) != nothing # brackets
32-
33-
put!(finished_async_tests, nothing)
11+
let serv = listen(7777)
12+
@async let s; try
13+
s = accept(serv)
14+
close(serv)
15+
@test JSON.parse(s) != nothing # a
16+
@test JSON.parse(s) != nothing # b
17+
validate_c(s) # c
18+
@test JSON.parse(s) != nothing # d
19+
validate_svg_tviewer_menu(s) # svg_tviewer_menu
20+
@test JSON.parse(s) != nothing # gmaps
21+
@test JSON.parse(s) != nothing # colors1
22+
@test JSON.parse(s) != nothing # colors2
23+
@test JSON.parse(s) != nothing # colors3
24+
@test JSON.parse(s) != nothing # twitter
25+
@test JSON.parse(s) != nothing # facebook
26+
validate_flickr(s) # flickr
27+
@test JSON.parse(s) != nothing # youtube
28+
@test JSON.parse(s) != nothing # iphone
29+
@test JSON.parse(s) != nothing # customer
30+
@test JSON.parse(s) != nothing # product
31+
@test JSON.parse(s) != nothing # interop
32+
validate_unicode(s) # unicode
33+
@test JSON.parse(s) != nothing # issue5
34+
@test JSON.parse(s) != nothing # dollars
35+
@test JSON.parse(s) != nothing # brackets
36+
37+
put!(finished_async_tests, nothing)
38+
catch ex
39+
@error "async test failure" _exception=ex
40+
finally
41+
@isdefined(s) && close(s)
42+
close(serv)
43+
end; end
3444
end
3545

36-
w = connect("localhost", 7777)
46+
w = connect(Sockets.localhost, 7777)
3747

3848
@test JSON.parse(a) != nothing
3949
write(w, a)

0 commit comments

Comments
 (0)