diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 967edeb..fabb551 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: push: branches: - master - tags: '*' + tags: ['*'] concurrency: # Skip intermediate builds: always. @@ -23,55 +23,46 @@ jobs: fail-fast: false matrix: julia-version: - - '1' # will expand to the latest stable 1.x release of Julia. + - '1' os: - ubuntu-latest - macos-latest - windows-latest R-version: - 'release' - arch: - - x64 steps: - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@latest + with: + version: ${{ matrix.julia-version }} + - uses: julia-actions/cache@v2 - name: Install R - if: matrix.os == 'macOS-latest' uses: r-lib/actions/setup-r@v2 with: + use-public-rspm: true r-version: ${{ matrix.R-version }} - name: set R lib path to be found by julia RCall if: matrix.os == 'ubuntu-latest' - run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> $GITHUB_ENV - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.julia-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 }}- + run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: file: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + docs: name: Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-r@v2 - - run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> $GITHUB_ENV - - uses: julia-actions/setup-julia@v1 + - run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + - uses: julia-actions/setup-julia@v2 with: version: '1' + - uses: julia-actions/cache@v2 - name: install dependencies run: | julia --project=docs -e ' diff --git a/.github/workflows/doccleanup.yml b/.github/workflows/doccleanup.yml index 1568024..494e86e 100644 --- a/.github/workflows/doccleanup.yml +++ b/.github/workflows/doccleanup.yml @@ -1,28 +1,34 @@ -name: Doc Preview Cleanup +# remove PR previews once they're merged +name: doc preview cleanup on: pull_request: types: [closed] +# ensure that only one "doc preview cleanup" workflow is force-pushing at a time +concurrency: + group: doc-preview-cleanup + cancel-in-progress: false + jobs: doc-preview-cleanup: runs-on: ubuntu-latest + permissions: + contents: write steps: - - name: Checkout gh-pages branch - uses: actions/checkout@v2 + - name: checkout gh-pages branch + uses: actions/checkout@v4 with: ref: gh-pages - - - name: Delete preview and history + - name: delete preview and history + push changes run: | - git config user.name "Documenter.jl" - git config user.email "documenter@juliadocs.github.io" - git rm -rf "previews/PR$PRNUM" - git commit -m "delete preview" - git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + if [ -d "${preview_dir}" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "${preview_dir}" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi env: - PRNUM: ${{ github.event.number }} - - - name: Push changes - run: | - git push --force origin gh-pages-new:gh-pages + preview_dir: previews/PR${{ github.event.number }} diff --git a/README.md b/README.md index 3a60295..86dcac7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,10 @@ [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://cecileane.github.io/PhyloPlots.jl/stable) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://cecileane.github.io/PhyloPlots.jl/dev) [![Build status](https://github.com/cecileane/PhyloPlots.jl/workflows/CI/badge.svg?branch=master)](https://github.com/cecileane/PhyloPlots.jl/actions/workflows/ci.yml) -[![codecov.io](http://codecov.io/github/cecileane/PhyloPlots.jl/coverage.svg?branch=master)](http://codecov.io/github/cecileane/PhyloPlots.jl?branch=master) +[![Coverage](https://codecov.io/gh/cecileane/PhyloPlots.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/cecileane/PhyloPlots.jl) +[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![PkgEval](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/P/PhyloPlots.svg)](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/report.html) ## overview diff --git a/docs/Project.toml b/docs/Project.toml index 1be77de..3c017cc 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -6,4 +6,4 @@ PhyloPlots = "c0d5b6db-e3fc-52bc-a87d-1d050989ed3b" RCall = "6f49c342-dc21-5d91-9882-a32aef131414" [compat] -Documenter = "~1" +Documenter = "1"