diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77ff6e7..0cf2453 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,8 +3,14 @@ on: push: branches: - main - tags: '*' - pull_request: + tags: ['*'] + pull_request: + workflow_dispatch: +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: ${{ matrix.group }} - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} @@ -32,16 +38,7 @@ jobs: if: ${{ matrix.version == '1.10' }} with: skip: Pkg,TOML,Statistics - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 env: @@ -51,21 +48,34 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} file: lcov.info + fail_ci_if_error: true docs: name: Documentation runs-on: ubuntu-latest + permissions: + actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created + contents: write + statuses: write steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: '1' + - uses: julia-actions/cache@v2 + - name: Configure doc environment + shell: julia --project=docs --color=yes {0} + run: | + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - run: | - julia --project=docs -e ' + - name: Run doctests + shell: julia --project=docs --color=yes {0} + run: | using Documenter: DocMeta, doctest using DistributionFits DocMeta.setdocmeta!(DistributionFits, :DocTestSetup, :(using Statistics, Distributions, DistributionFits); recursive=true)