Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI update in github workflows #25

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading