From 83ff71087d54d5db301fff091ae94689a8143e7c Mon Sep 17 00:00:00 2001 From: Justin Willmert Date: Wed, 4 Nov 2020 13:40:56 -0600 Subject: [PATCH] Switch to GitHub Actions CI Workflows copied from PkgTemplates.jl output. --- .github/workflows/CompatHelper.yml | 16 ++++++++++++ .github/workflows/TagBot.yml | 8 ++++-- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++ .travis.yml | 34 ------------------------- README.md | 3 ++- 5 files changed, 65 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/CompatHelper.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml new file mode 100644 index 0000000..cba9134 --- /dev/null +++ b/.github/workflows/CompatHelper.yml @@ -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()' diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index dd911f3..f49313b 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,11 +1,15 @@ name: TagBot on: - schedule: - - cron: 0 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 with: token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8441489 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI +on: + - push + - pull_request +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' # earliest supported + - '1.5' # latest release + - 'nightly' + os: + - ubuntu-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: codecov/codecov-action@v1 + with: + file: lcov.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8d1c7ef..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -## Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux - - osx -julia: - - 1.5 # latest stable - - 1.3 # LTS - - 1.0 # oldest support - - nightly -branches: - only: - - master - - /^v[0-9]+\.[0-9]+\.[0-9]+$/ # version tags for Documenter.jl - - /^release-.*$/ -notifications: - email: false -codecov: false - -jobs: - allow_failures: - - julia: nightly - fast_finish: true - - # Explicitly exclude the matrix-expanded latest stable job, and then - # reinclude it with the additional codecov parameter enabled. - exclude: - - julia: 1.5 - os: linux - codecov: false - include: - - julia: 1.5 - os: linux - codecov: true diff --git a/README.md b/README.md index eeba2ac..6c9bbaf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # BitFlags.jl -[![Build Status](https://travis-ci.com/jmert/BitFlags.jl.svg?branch=master)](https://travis-ci.com/jmert/BitFlags.jl) +[![Build Status](https://github.com/jmert/BitFlags.jl/workflows/CI/badge.svg)](https://github.com/jmert/BitFlags.jl/actions) +[![Coverage](https://codecov.io/gh/jmert/BigFlags.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/jmert/BigFlags.jl) `BitFlag.jl` provides an `Enum`-like type for bit flag option values. The main motivations are: