|  | 
|  | 1 | +name: ReleaseTest | 
|  | 2 | +on: | 
|  | 3 | +  push: | 
|  | 4 | +    branches: [master] | 
|  | 5 | +    tags: [v*] | 
|  | 6 | +  pull_request: | 
|  | 7 | +    paths-ignore: | 
|  | 8 | +        - 'docs/**' | 
|  | 9 | + | 
|  | 10 | +concurrency: | 
|  | 11 | +  # Skip intermediate builds: always, but for the master branch and tags. | 
|  | 12 | +  # Cancel intermediate builds: always, but for the master branch and tags. | 
|  | 13 | +  group: ${{ github.workflow }}-${{ github.ref }} | 
|  | 14 | +  cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*' }} | 
|  | 15 | + | 
|  | 16 | +jobs: | 
|  | 17 | +  test: | 
|  | 18 | +    name: ${{ matrix.package.package }}/${{ matrix.package.group }}/${{ matrix.julia-version }} | 
|  | 19 | +    runs-on: ${{ matrix.os }} | 
|  | 20 | +    env: | 
|  | 21 | +      GROUP: ${{ matrix.package.group }} | 
|  | 22 | +    strategy: | 
|  | 23 | +      fail-fast: false | 
|  | 24 | +      matrix: | 
|  | 25 | +        julia-version: [1] | 
|  | 26 | +        os: [ubuntu-latest] | 
|  | 27 | +        package: | 
|  | 28 | +          - {package: Catalyst, group: All} | 
|  | 29 | +    steps: | 
|  | 30 | +      - uses: actions/checkout@v4 | 
|  | 31 | +      - uses: julia-actions/setup-julia@v1 | 
|  | 32 | +        with: | 
|  | 33 | +          version: ${{ matrix.julia-version }} | 
|  | 34 | +          arch: x64 | 
|  | 35 | +      - uses: julia-actions/julia-buildpkg@latest | 
|  | 36 | +      - name: Create test directory | 
|  | 37 | +        run: mkdir downstream | 
|  | 38 | +      - name: Load this and run the downstream tests | 
|  | 39 | +        shell: julia --color=yes --project=downstream {0} | 
|  | 40 | +        run: | | 
|  | 41 | +          using Pkg | 
|  | 42 | +          try | 
|  | 43 | +            Pkg.activate("downstream") | 
|  | 44 | +            # force it to use this PR's version of the package | 
|  | 45 | +            Pkg.develop(PackageSpec(path="."))  # resolver may fail with main deps | 
|  | 46 | +            Pkg.add("${{ matrix.package.package }}") | 
|  | 47 | +            Pkg.update() | 
|  | 48 | +            Pkg.test("Catalyst"; coverage=true)  # resolver may fail with test time deps | 
|  | 49 | +          catch err | 
|  | 50 | +            err isa Pkg.Resolve.ResolverError || rethrow() | 
|  | 51 | +            # If we can't resolve that means this is incompatible by SemVer and this is fine | 
|  | 52 | +            # It means we marked this as a breaking change, so we don't need to worry about | 
|  | 53 | +            # Mistakenly introducing a breaking change, as we have intentionally made one | 
|  | 54 | +            @info "Not compatible with this release. No problem." exception=err | 
|  | 55 | +            exit(0)  # Exit immediately, as a success | 
|  | 56 | +          end | 
|  | 57 | +      - uses: julia-actions/julia-processcoverage@v1 | 
|  | 58 | +      - uses: codecov/codecov-action@v5 | 
|  | 59 | +        with: | 
|  | 60 | +          files: lcov.info | 
|  | 61 | +          token: ${{ secrets.CODECOV_TOKEN }} | 
|  | 62 | +          fail_ci_if_error: false | 
0 commit comments