Add rollup job to CI.yml and enable auto merge #10
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| permissions: | |
| actions: write | |
| contents: write | |
| jobs: | |
| test: | |
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - 'lts' | |
| - '1' | |
| os: | |
| - ubuntu-latest | |
| arch: | |
| - x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: ${{ matrix.version }} | |
| arch: ${{ matrix.arch }} | |
| - name: Add Julia Registries | |
| run: | | |
| julia -e ' | |
| using Pkg | |
| Pkg.Registry.add( | |
| RegistrySpec(url = "https://github.com/tensor4all/T4ARegistry.git") | |
| )' | |
| - uses: julia-actions/cache@v2 | |
| - uses: julia-actions/julia-buildpkg@v1 | |
| - uses: julia-actions/julia-runtest@v1 | |
| - uses: julia-actions/julia-processcoverage@v1 | |
| - uses: codecov/codecov-action@v3 | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1' | |
| - name: Add Julia Registries | |
| run: | | |
| julia -e ' | |
| using Pkg | |
| Pkg.Registry.add( | |
| RegistrySpec(url = "https://github.com/tensor4all/T4ARegistry.git") | |
| )' | |
| - uses: julia-actions/julia-buildpkg@v1 | |
| - uses: julia-actions/julia-docdeploy@v1 | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
| rollup: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test | |
| - docs | |
| if: always() | |
| steps: | |
| - name: All tests passed | |
| if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} | |
| run: exit 0 | |
| - name: Some tests failed or cancelled | |
| if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: exit 1 | |