diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5b4e0ac..f0f80c1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,9 +6,15 @@ on: pull_request: branches: [ main, master ] +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: always. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -16,15 +22,16 @@ jobs: version: - '1.10' - '1.11' + - '1.12' os: - ubuntu-latest - - macos-latest + - macOS-latest arch: - - x64 + - "default" steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v5 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} @@ -43,4 +50,11 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - + with: + coverage: true + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + continue-on-error: true diff --git a/.github/workflows/DocPreviewsCleanup.yml b/.github/workflows/DocPreviewsCleanup.yml index cbed7d7..176025f 100644 --- a/.github/workflows/DocPreviewsCleanup.yml +++ b/.github/workflows/DocPreviewsCleanup.yml @@ -10,10 +10,10 @@ on: lookback: default: 3 -# Ensure that only one "Doc Previews Cleanup" workflow is force pushing at a time concurrency: - group: doc-preview-cleanup - cancel-in-progress: false + # Same group concurrency as the `Documentation.yml` workflow, because they both + # git-push to the same branch, so we want to avoid clashes. + group: docs-pushing jobs: doc-preview-cleanup: @@ -22,7 +22,7 @@ jobs: contents: write steps: - name: Checkout gh-pages branch - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: gh-pages - name: Delete preview and history + push changes diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 0000000..2396dce --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,52 @@ +name: Documentation + +on: + push: + branches: + - main + tags: "*" + paths: + - ".github/workflows/Documention.yml" + - "docs/**" + - "src/**" + - "Project.toml" + - "CHANGELOG.md" + pull_request: + paths: + - ".github/workflows/Documention.yml" + - "docs/**" + - "src/**" + - "Project.toml" + - "CHANGELOG.md" + release: + +concurrency: + # Same group concurrency as the `DocPreviewsCleanup.yml` workflow, because they both + # git-push to the same branch, so we want to avoid clashes. NOTE: this is + # different from the concurrency group below, which is to cancel successive + # jobs from within the PR. + group: docs-pushing + +jobs: + build: + permissions: + actions: write + contents: write + pull-requests: read + statuses: write + runs-on: ubuntu-latest + timeout-minutes: 20 + 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/') }} + steps: + - uses: actions/checkout@v5 + - uses: julia-actions/setup-julia@v2 + with: + version: '1.10' + - uses: julia-actions/julia-docdeploy@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index 8eb0334..0000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - tags: '*' - pull_request: - -jobs: - build: - # These permissions are needed to: - # - Deploy the documentation: https://documenter.juliadocs.org/stable/man/hosting/#Permissions - # - Delete old caches: https://github.com/julia-actions/cache#usage - permissions: - actions: write - contents: write - pull-requests: read - statuses: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v2 - with: - version: '1.11' - - uses: julia-actions/cache@v2 - - name: Install dependencies - shell: julia --color=yes --project=docs {0} - run: | - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate() - - name: Build and deploy - run: julia --color=yes --project=docs docs/make.jl - env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key diff --git a/README.md b/README.md index 07543ed..164c083 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ Julia wrapper for [xESMF](https://github.com/pangeo-data/xESMF), a python packag CI + + + + ## Overview XESMF.jl provides a Julia interface to the [xESMF](https://github.com/pangeo-data/xESMF) (xarray Earth System Model Exchange Format) Python library, which provides tools for interpolating and regridding fields between arbitrary grids.