Skip to content

Commit

Permalink
CI update in github workflows (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecileane authored May 16, 2024
1 parent 01cae88 commit 072af04
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
37 changes: 14 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches:
- master
tags: '*'
tags: ['*']

concurrency:
# Skip intermediate builds: always.
Expand All @@ -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 '
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/doccleanup.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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 "[email protected]"
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 }}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PhyloPlots = "c0d5b6db-e3fc-52bc-a87d-1d050989ed3b"
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"

[compat]
Documenter = "~1"
Documenter = "1"

2 comments on commit 072af04

@cecileane
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/106992

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.1 -m "<description of version>" 072af047ed5737f33790bae22c700efc70462575
git push origin v1.0.1

Please sign in to comment.