From b60b54dc7fd2061e34acdd882bb4d4f59abe060d Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Fri, 5 Mar 2021 13:56:28 -0800 Subject: [PATCH 1/2] Setup CI on GitHub Actions --- .github/workflows/docs.yml | 36 ++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..3db3184 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,36 @@ +name: Documentation + +on: + push: + branches: + - master + - actions/trigger/docs + tags: '*' + pull_request: + +jobs: + Documenter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + with: + version: 1.4 + - name: Install Run.jl + run: julia -e 'using Pkg; pkg"add Run@0.1"' + - name: Install dependencies + run: julia -e 'using Run; Run.prepare_docs()' + - name: Build and deploy + id: build-and-deploy + if: | + github.event_name == 'push' || ( + github.event_name == 'pull_request' && + !contains(github.head_ref, 'create-pull-request/') + ) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.SSH_KEY }} + run: julia -e 'using Run; Run.docs()' + - name: Just build + if: steps.build-and-deploy.outcome == 'skipped' + run: julia -e 'using Run; Run.docs()' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6627ed4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Run tests + +on: + push: + branches: + - master + tags: '*' + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + julia-version: ['~1.6.0-rc1', '1.5', '1.4', 'nightly'] + fail-fast: false + name: Test Julia ${{ matrix.julia-version }} + steps: + - uses: actions/checkout@v2 + - name: Setup julia + uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + - run: julia -e 'using Pkg; pkg"add Run@0.1"' + - run: julia -e 'using Run; Run.prepare("test")' + - run: julia -e 'using Run; Run.test()' + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: ./lcov.info + flags: unittests + name: codecov-umbrella From b0a5ee8e3506ac4505c77d552728c21dabd2e596 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Fri, 5 Mar 2021 14:03:47 -0800 Subject: [PATCH 2/2] Remove .travis.yml --- .travis.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6e73702..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux - # - osx -julia: - - 1.1 - - nightly -matrix: - allow_failures: - - julia: nightly - fast_finish: true -notifications: - email: false -install: - - unset JULIA_PROJECT - - julia -e 'using Pkg; pkg"add https://github.com/tkf/Run.jl"' - - julia -e 'using Run; Run.prepare_test()' -script: - - julia -e 'using Run; Run.test()' -after_success: - - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' - - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())' -jobs: - include: - - stage: Documentation - julia: 1.1 - script: julia --project=docs --color=yes -e ' - using Pkg; - Pkg.develop(PackageSpec(path=pwd())); - Pkg.instantiate(); - include("docs/make.jl");' - after_success: skip