Skip to content

Commit

Permalink
Merge branch 'main' into feature/test_arg
Browse files Browse the repository at this point in the history
  • Loading branch information
FrameConsult committed Feb 24, 2024
2 parents bad0a45 + 3a055a9 commit 0365f5f
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 50 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
33 changes: 0 additions & 33 deletions .github/workflows/backup.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout Example.jl
uses: actions/checkout@v2
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
repository: julia-actions/Example.jl

Expand All @@ -41,16 +41,16 @@ jobs:
shell: bash

- name: Checkout julia-runtest
uses: actions/checkout@v2
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
path: ./.github/actions/julia-runtest

- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@a1561e938c17e7aaf8236334d6d533e774c71dcd
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- uses: actions/cache@v1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
env:
cache-name: cache-artifacts
with:
Expand All @@ -61,13 +61,13 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-buildpkg@90dd6f23eb49626e4e6612cb9d64d456f86e6a1c

- uses: ./.github/actions/julia-runtest

- uses: julia-actions/julia-processcoverage@v1
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38

- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
file: lcov.info

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_logger_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:

steps:
- name: Checkout julia-runtest
uses: actions/checkout@v2
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@a1561e938c17e7aaf8236334d6d533e774c71dcd
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- uses: actions/cache@v1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
env:
cache-name: cache-artifacts
with:
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,37 @@ An example workflow that uses this action might look like this:
```yaml
name: Run tests

on:
on:
push:
branches:
- master
- main
pull_request:

# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.0', '1', 'nightly']
julia-version: ['1.6', '1', 'nightly']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
- os: macOS-latest
julia-arch: x86

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
# with:
Expand All @@ -45,7 +51,7 @@ jobs:
You can add this workflow to your repository by placing it in a file called `test.yml` in the folder `.github/workflows/`. [More info here](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions).

Here, setting `annotate: true` causes GitHub "annotations" to appear when reviewing the PR, pointing to failing tests, if any.
This functionality is only enabled on Julia 1.8 (even if `annotate` is set to `true`), since currently it does not work on other Julia versions (see #76).
This functionality is only enabled on Julia 1.8 (even if `annotate` is set to `true`), since currently it does not work on other Julia versions (see [#76](https://github.com/julia-actions/julia-runtest/issues/76)).

By default, `annotate` is set to false, but that may change in future releases of this action.
### Prefixing the Julia command
Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
annotate:
description: 'Whether or not to attempt to create GitHub annotations to show test failures inline. Only effective on Julia 1.8+.'
default: 'false'
compiled_modules:
description: 'Whether to run tests with `compiled-modules`. For possible values, refer to https://docs.julialang.org/en/v1/manual/command-line-interface/#command-line-interface'
default: 'yes'
test_arg:
description: 'Argument string that is passed on to test.'
default: ''
Expand Down Expand Up @@ -69,4 +72,8 @@ runs:
COVERAGE: ${{ inputs.coverage }}
FORCE_LATEST_COMPATIBLE_VERSION: ${{ inputs.force_latest_compatible_version }}
CHECK_BOUNDS: ${{ inputs.check_bounds }}
<<<<<<< HEAD
TEST_ARG: ${{ inputs.test_arg }}
=======
COMPILED_MODULES: ${{ inputs.compiled_modules }}
>>>>>>> main
6 changes: 3 additions & 3 deletions test_harness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import Pkg
include("kwargs.jl")
kwargs = Kwargs.kwargs(; coverage=ENV["COVERAGE"],
force_latest_compatible_version=ENV["FORCE_LATEST_COMPATIBLE_VERSION"],
julia_args=[string("--check-bounds=", ENV["CHECK_BOUNDS"])],
julia_args=[string("--check-bounds=", ENV["CHECK_BOUNDS"]),
string("--compiled-modules=", ENV["COMPILED_MODULES"])],
test_arg=ENV["TEST_ARG"],
)

)
if parse(Bool, ENV["ANNOTATE"]) && v"1.8pre" < VERSION < v"1.9.0-beta3"
push!(LOAD_PATH, "@tests-logger-env") # access dependencies
using GitHubActions, Logging
Expand Down

0 comments on commit 0365f5f

Please sign in to comment.