From 54d119447aaf6f06bf1c7b98be91efb070725d90 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Tue, 30 Aug 2022 08:12:00 -0700 Subject: [PATCH] Fix and simplify CI setup The problem with the documentation setup introduced in PR 94 was that the actions were improperly specified. That is fixed in this commit. In addition, the following changes were made to simplify the setup, bringing it more in line with Example.jl (I actually copied the file from there and made individual changes) and most other Julia packages: - The cronjob for running tests has been removed; it doesn't provide meaningful benefit atop running on PRs, tags, and pushes to `main`. - The concurrency specification has been removed. I believe what's specified is actually the default behavior. - `include` mentions a version check and branch protection but neither are present (I assume this was copied from elsewhere) so that step has been removed. - The separate `JuliaNightly` CI has been incorporated back into the regular CI setup as an `include` step. This avoids duplication. - provides a template in its README which includes a few more items not present in the one here. Those have been added. Hopefully these changes will make things more consistent and easier to maintain going forward. --- .github/workflows/CI.yml | 29 ++++++--------------------- .github/workflows/JuliaNightly.yml | 32 ------------------------------ .github/workflows/TagBot.yml | 5 +++++ 3 files changed, 11 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/JuliaNightly.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 74b4260..e222589 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,17 +1,9 @@ name: CI -# Run on main, tags, or any pull request on: - schedule: - - cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST) push: branches: [main] tags: ["*"] pull_request: -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: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} @@ -20,8 +12,8 @@ jobs: fail-fast: false matrix: version: - - "1.6" # first supported version - - "1" # Latest Release + - '1.6' + - '1' # automatically expands to the latest stable 1.x release of Julia os: - ubuntu-latest - macOS-latest @@ -36,14 +28,9 @@ jobs: - os: windows-latest arch: x86 include: - # Add specific version used to run the reference tests. - # Must be kept in sync with version check in `test/runtests.jl`, - # and with the branch protection rules on the repository which - # require this specific job to pass on all PRs - # (see Settings > Branches > Branch protection rules). - os: ubuntu-latest - version: 1.7.2 arch: x64 + version: nightly steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 @@ -56,18 +43,14 @@ jobs: - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v2 with: - files: lcov.info - + file: lcov.info docs: name: Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - uses: julia-buildpkg@v1 - - uses: julia-docdeploy@v1 + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-docdeploy@latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/JuliaNightly.yml b/.github/workflows/JuliaNightly.yml deleted file mode 100644 index f521f61..0000000 --- a/.github/workflows/JuliaNightly.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: JuliaNightly -# Nightly Scheduled Julia Nightly Run -on: - schedule: - - cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST) -jobs: - test: - name: Julia Nightly - Ubuntu - x64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: nightly - arch: x64 - - uses: actions/cache@v2 - env: - cache-name: julia-nightly-cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ env.cache-name }}- - - uses: julia-actions/julia-buildpkg@latest - - run: | - git config --global user.name Tester - git config --global user.email te@st.er - - uses: julia-actions/julia-runtest@latest - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v2 - with: - files: lcov.info diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..f389611 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,11 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + contents: write jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'