diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..235cb11a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: +- package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'monthly' diff --git a/.github/workflows/backup.yml b/.github/workflows/backup.yml deleted file mode 100644 index 1b08aa5b..00000000 --- a/.github/workflows/backup.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Backup - -on: - schedule: - - cron: '5 4 * * 0' - - workflow_dispatch: - -jobs: - backup: - runs-on: ubuntu-20.04 - - steps: - - name: Configure cache - uses: actions/cache@v2 - with: - path: | - ${{ env.GITHUB_WORKSPACE }} - ~/.cache/restic - key: ${{ runner.os }} - - - name: Install the correct Python version - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Run backup action - uses: julia-actions/restic-action@main - env: # Options: https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables - RESTIC_REPOSITORY: b2:${{ secrets.B2_BUCKET }}:${{ github.repository }} - RESTIC_PASSWORD: ${{ secrets.RESTIC_PASSWORD }} - B2_ACCOUNT_ID: ${{ secrets.B2_ACCOUNT_ID }} - B2_ACCOUNT_KEY: ${{ secrets.B2_ACCOUNT_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77245cc..f9de7d2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout Example.jl - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: repository: julia-actions/Example.jl @@ -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: @@ -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 diff --git a/.github/workflows/test_logger_ci.yml b/.github/workflows/test_logger_ci.yml index 0120f372..ba0c8b9f 100644 --- a/.github/workflows/test_logger_ci.yml +++ b/.github/workflows/test_logger_ci.yml @@ -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: diff --git a/README.md b/README.md index feda4ca8..80697c8f 100644 --- a/README.md +++ b/README.md @@ -11,19 +11,24 @@ 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: @@ -31,11 +36,12 @@ jobs: 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: @@ -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 diff --git a/action.yml b/action.yml index f9586ab7..a2ff065e 100644 --- a/action.yml +++ b/action.yml @@ -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: '' @@ -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 diff --git a/test_harness.jl b/test_harness.jl index f297481a..0dbedc24 100644 --- a/test_harness.jl +++ b/test_harness.jl @@ -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