Skip to content

Commit

Permalink
Update workflow files, fix typo
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 committed Apr 9, 2024
1 parent 9136dca commit be2ae36
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

0 comments on commit be2ae36

Please sign in to comment.