From 5ebbdffaf9d175fc33f9959449fe4ade455fb69d Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Fri, 5 Mar 2021 13:56:28 -0800 Subject: [PATCH] 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..769cd9d --- /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()' + - 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