Skip to content

Commit

Permalink
Merge pull request #1086 from DilumAluthge/dpa/integration-tests
Browse files Browse the repository at this point in the history
CI: split the integration tests into a separate job
  • Loading branch information
ablaom authored Jan 16, 2024
2 parents 7358186 + 0901985 commit 51ed76e
Showing 1 changed file with 44 additions and 10 deletions.
54 changes: 44 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- master
- dev
tags: '*'
permissions:
contents: read
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -21,40 +23,72 @@ jobs:
- '1' # automatically expands to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
arch:
- x64
arch: # TODO: delete the `arch`
- x64 # TODO: delete the `arch`
steps:
- name: Determine if PR is from a fork
run: |
echo "head_ref is: ${{ github.head_ref }}"
echo "target repository is: ${{ github.repository }}"
echo "head repository is: ${{ github.event.pull_request.head.repo.full_name }}"
- name: Set integration test flag
if: (github.head_ref == 'dev') && (github.repository == github.event.pull_request.head.repo.full_name)
run: |
echo "MLJ_TEST_INTEGRATION=true" >> "${GITHUB_ENV:?}"
- name: Verify the value of the integration test flag
run: |
echo "MLJ_TEST_INTEGRATION is ${MLJ_TEST_INTEGRATION}"
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
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@v1
with:
file: lcov.info
integration:
# This job (the `integration` job) has a conditional (`if:`) with the following
# three conditions:
#
# 1. Make sure that this is a PR:
# github.event_name == 'pull_request'
#
# 2. Make sure that the PR head branch is `dev`:
# github.head_ref == 'dev'
#
# 3. Make sure that the PR is NOT from a fork:
# github.repository == github.event.pull_request.head.repo.full_name
if: (github.event_name == 'pull_request') && (github.head_ref == 'dev') && (github.repository == github.event.pull_request.head.repo.full_name)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # automatically expands to the latest stable 1.x release of Julia.
os:
- 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
# This environment variable enables the integration tests:
MLJ_TEST_INTEGRATION: '1'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
env:
JULIA_PKG_SERVER: ""
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: julia-actions/setup-julia@v1
with:
version: '1'
Expand Down

0 comments on commit 51ed76e

Please sign in to comment.