Skip to content

Don't run CI on nightly #882

Don't run CI on nightly

Don't run CI on nightly #882

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags: ["*"]
pull_request:
merge_group: # GitHub Merge Queue
jobs:
finalize:
timeout-minutes: 10
needs: [test, docs]
if: always() # Important: Make sure that this job runs even if the tests fail.
runs-on: ubuntu-latest # GitHub-hosted runners
steps:
- run: |
echo test: ${{ needs.test.result }}
echo docs: ${{ needs.docs.result }}
- run: exit 1
# Every line except the last line must end with `||`.
# The last line must NOT end with `||`.
if: |
(needs.test.result != 'success') ||
(needs.docs.result != 'success')
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' # automatically expands to the latest stable 1.x release of Julia
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- x86
exclude:
- os: macOS-latest
arch: x86
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
include-all-prereleases: true
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@v4
with:
file: lcov.info
# This is a public repo.
# We are using v4 of the codecov-action.
# If the PR is from a fork, then Codecov allows us to use
# tokenless Codecov uploads.
# If the PR is not from a fork, then Codecov does not allow
# us to use tokenless Codecov uploads, and thus we must use
# the token.
# Tokenless Codcov uploads are prone to random failures,
# due to Codecov's servers hitting GitHub rate limits.
# Therefore:
# 1. If this CI run is not a PR run, we set `fail_ci_if_error` to `true`.
# 2. If this CI run is a PR run and the PR is not from a fork, we set `fail_ci_if_error` to `true`.
# 3. If this CI run is a PR run and the PR is from a fork, we set `fail_ci_if_error` to `false`.
fail_ci_if_error: ${{ (github.event_name != 'pull_request') || (github.repository == github.event.pull_request.head.repo.full_name) }}
token: ${{ secrets.CODECOV_TOKEN }}
docs:
permissions:
contents: write
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: nightly # needed until https://github.com/JuliaLang/julia/issues/49620 is in a release
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}