Skip to content

Commit

Permalink
Merge pull request #319 from vtjnash/jn/github-actions
Browse files Browse the repository at this point in the history
switch CI to GitHub Actions
  • Loading branch information
davidanthoff authored Mar 22, 2021
2 parents 2987b15 + 1220949 commit 1c24980
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 89 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
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.0'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
include:
- version: '1'
os: ubuntu-latest
arch: x86
- version: '1'
os: windows-latest
arch: x64
- version: '1'
os: macos-latest
arch: x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- 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
7 changes: 5 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
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
Expand Down
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

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

[![Build Status](https://travis-ci.org/JuliaIO/JSON.jl.svg)](https://travis-ci.org/JuliaIO/JSON.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/2sfomjwl29k6y6oy)](https://ci.appveyor.com/project/staticfloat/json-jl)
[![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)
[![codecov.io](http://codecov.io/github/JuliaIO/JSON.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaIO/JSON.jl?branch=master)

## Installation
Expand Down
43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

70 changes: 40 additions & 30 deletions test/async.jl
Original file line number Diff line number Diff line change
@@ -1,39 +1,49 @@
using JSON
using Test
using Distributed: RemoteChannel

@isdefined(a) || include("json-samples.jl")

finished_async_tests = RemoteChannel()

using Sockets

@async begin
s = listen(7777)
s = accept(s)

Base.start_reading(s)

@test JSON.parse(s) != nothing # a
@test JSON.parse(s) != nothing # b
validate_c(s) # c
@test JSON.parse(s) != nothing # d
validate_svg_tviewer_menu(s) # svg_tviewer_menu
@test JSON.parse(s) != nothing # gmaps
@test JSON.parse(s) != nothing # colors1
@test JSON.parse(s) != nothing # colors2
@test JSON.parse(s) != nothing # colors3
@test JSON.parse(s) != nothing # twitter
@test JSON.parse(s) != nothing # facebook
validate_flickr(s) # flickr
@test JSON.parse(s) != nothing # youtube
@test JSON.parse(s) != nothing # iphone
@test JSON.parse(s) != nothing # customer
@test JSON.parse(s) != nothing # product
@test JSON.parse(s) != nothing # interop
validate_unicode(s) # unicode
@test JSON.parse(s) != nothing # issue5
@test JSON.parse(s) != nothing # dollars
@test JSON.parse(s) != nothing # brackets

put!(finished_async_tests, nothing)
let serv = listen(7777)
@async let s; try
s = accept(serv)
close(serv)
@test JSON.parse(s) != nothing # a
@test JSON.parse(s) != nothing # b
validate_c(s) # c
@test JSON.parse(s) != nothing # d
validate_svg_tviewer_menu(s) # svg_tviewer_menu
@test JSON.parse(s) != nothing # gmaps
@test JSON.parse(s) != nothing # colors1
@test JSON.parse(s) != nothing # colors2
@test JSON.parse(s) != nothing # colors3
@test JSON.parse(s) != nothing # twitter
@test JSON.parse(s) != nothing # facebook
validate_flickr(s) # flickr
@test JSON.parse(s) != nothing # youtube
@test JSON.parse(s) != nothing # iphone
@test JSON.parse(s) != nothing # customer
@test JSON.parse(s) != nothing # product
@test JSON.parse(s) != nothing # interop
validate_unicode(s) # unicode
@test JSON.parse(s) != nothing # issue5
@test JSON.parse(s) != nothing # dollars
@test JSON.parse(s) != nothing # brackets

put!(finished_async_tests, nothing)
catch ex
@error "async test failure" _exception=ex
finally
@isdefined(s) && close(s)
close(serv)
end; end
end

w = connect("localhost", 7777)
w = connect(Sockets.localhost, 7777)

@test JSON.parse(a) != nothing
write(w, a)
Expand Down

0 comments on commit 1c24980

Please sign in to comment.