Skip to content

Commit

Permalink
Update workflow files, fix typo (#14)
Browse files Browse the repository at this point in the history
This modernizes the workflow files, and streamlines the testing
(for a simple package that doesn't seem hardware-specific,
I don't think there's a strong reason to test on so many platforms).
I added Documenter keys specifically for TagBot.

Also fixes typo noticed in #12 (comment).
  • Loading branch information
timholy authored Apr 10, 2024
1 parent 9136dca commit a7f398a
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 31 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
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'
- '1'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
# docs:
# name: Documentation
# runs-on: ubuntu-latest
# permissions:
# contents: write
# statuses: write
# steps:
# - uses: actions/checkout@v2
# - uses: julia-actions/setup-julia@v1
# with:
# version: '1'
# - uses: julia-actions/julia-buildpkg@v1
# - uses: julia-actions/julia-docdeploy@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - run: |
# julia --project=docs -e '
# using Documenter: DocMeta, doctest
# using BlobParametrization
# DocMeta.setdocmeta!(BlobParametrization, :DocTestSetup, :(using BlobParametrization); recursive=true)
# doctest(BlobParametrization)'
32 changes: 32 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
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 }}
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
ssh: ${{ secrets.DOCUMENTER_KEY }}
30 changes: 0 additions & 30 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end
@test fa isa ReadOnlyArray{Float64,2}
@test fa == x

a = ReadOnly([1, 2])
a = ReadOnlyArray([1, 2])
@test typeof(similar(a)) === Vector{Int64}

@test copy(a) == [1, 2]
Expand Down

2 comments on commit a7f398a

@timholy
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/104617

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 v0.2.0 -m "<description of version>" a7f398aef426a2bee3414b5b8089c9a8cae636b2
git push origin v0.2.0

Please sign in to comment.