Add some very basic CI #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
concurrency: | |
# Skip intermediate builds: all builds except for builds on the `master` branch | |
# Cancel intermediate builds: only pull request builds | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
permissions: | |
contents: read | |
packages: read | |
env: | |
MY_GCR_NAMESPACE: 'juliaparallel' | |
MY_GCR_IMAGENAME: 'dask-jobqueue-ci-images' | |
jobs: | |
finalize: | |
timeout-minutes: 10 | |
needs: | |
- test-htc | |
# Important: the next line MUST be `if: always()`. | |
# Do not change that line. | |
# That line is necessary to make sure that this job runs even if tests fail. | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo test-htc: ${{ needs.test-htc.result }} | |
- run: exit 1 | |
# The last line must NOT end with || | |
# All other lines MUST end with || | |
if: | | |
(needs.test-htc.result != 'success') | |
test-htc: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
# Please note: You must specify the full Julia version number (major.minor.patch). | |
# This is because the value here will be directly interpolated into a download URL. | |
- '1.0.5' # minimum Julia version supported in Project.toml | |
- '1.6.7' # previous LTS | |
- '1.10.7' # current LTS | |
- '1.11.2' # currently the latest stable release | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
- run: docker version | |
- run: docker compose version | |
- run: docker compose pull | |
working-directory: ci/htcondor | |
- run: docker compose build --build-arg JULIA_VERSION="${MATRIX_VERSION:?}" | |
working-directory: ci/htcondor | |
env: | |
MATRIX_VERSION: ${{matrix.version}} | |
- run: ./start-htcondor.sh | |
working-directory: ci/htcondor | |
- run: docker compose exec -T --user submituser submit condor_submit --help | |
working-directory: ci/htcondor | |
- run: docker compose exec -T --user submituser submit julia --version | |
working-directory: ci/htcondor | |
- run: docker compose exec -T --user submituser submit julia --project=/SlurmClusterManager -e 'import Pkg; Pkg.test()' | |
working-directory: ci/htcondor | |
- run: find . -type f -name '*.cov' | |
- name: Copy .cov files out of the Docker container | |
run: | | |
# docker compose exec -T --user submituser submit /bin/bash -c 'cd ~/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf - | |
docker compose exec -T --user submituser execute1 /bin/bash -c 'cd ~/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf - | |
# docker compose exec -T --user submituser execute2 /bin/bash -c 'cd ~/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf - | |
- run: find . -type f -name '*.cov' | |
# - run: find . -type f -name '*.cov' -exec cat {} \; | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v5 | |
with: | |
files: lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# If this PR is from a fork, then do NOT fail CI if the Codecov upload errors. | |
# If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors. | |
# If this is not a PR, then DO fail CI if the Codecov upload errors. | |
fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }} |