|
| 1 | +name: CI |
| 2 | +# Run on master, tags, or any pull request |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST) |
| 6 | + push: |
| 7 | + branches: [master] |
| 8 | + tags: ["*"] |
| 9 | + pull_request: |
| 10 | +jobs: |
| 11 | + test: |
| 12 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + version: |
| 18 | + - 1 |
| 19 | + os: |
| 20 | + - ubuntu-latest |
| 21 | + - macOS-latest |
| 22 | + - windows-latest |
| 23 | + arch: |
| 24 | + - x64 |
| 25 | + include: |
| 26 | + # Add a 1.0 job just to make sure we still support it |
| 27 | + - os: ubuntu-latest |
| 28 | + version: 1.0.5 |
| 29 | + arch: x64 |
| 30 | + # Add a 1.3 job because that's what Invenia actually uses |
| 31 | + - os: ubuntu-latest |
| 32 | + version: 1.3 |
| 33 | + arch: x64 |
| 34 | + # Add a 32-bit job to ensure we don't have any 64-bit specific logic |
| 35 | + - os: ubuntu-latest |
| 36 | + version: 1 |
| 37 | + arch: x86 |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v2 |
| 40 | + - uses: julia-actions/setup-julia@v1 |
| 41 | + with: |
| 42 | + version: ${{ matrix.version }} |
| 43 | + arch: ${{ matrix.arch }} |
| 44 | + - uses: actions/cache@v1 |
| 45 | + env: |
| 46 | + cache-name: cache-artifacts |
| 47 | + with: |
| 48 | + path: ~/.julia/artifacts |
| 49 | + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
| 50 | + restore-keys: | |
| 51 | + ${{ runner.os }}-test-${{ env.cache-name }}- |
| 52 | + ${{ runner.os }}-test- |
| 53 | + ${{ runner.os }}- |
| 54 | + - uses: julia-actions/julia-buildpkg@latest |
| 55 | + - run: | |
| 56 | + git config --global user.name Tester |
| 57 | + git config --global user.email [email protected] |
| 58 | + - uses: julia-actions/julia-runtest@latest |
| 59 | + - uses: julia-actions/julia-processcoverage@v1 |
| 60 | + - uses: codecov/codecov-action@v1 |
| 61 | + with: |
| 62 | + file: lcov.info |
| 63 | + |
| 64 | + slack: |
| 65 | + name: Notify Slack Failure |
| 66 | + needs: test |
| 67 | + runs-on: ubuntu-latest |
| 68 | + if: github.event == 'schedule' |
| 69 | + steps: |
| 70 | + - uses: technote-space/workflow-conclusion-action@v2 |
| 71 | + - uses: voxmedia/github-action-slack-notify-build@v1 |
| 72 | + if: env.WORKFLOW_CONCLUSION == 'failure' |
| 73 | + with: |
| 74 | + channel: nightly-dev |
| 75 | + status: FAILED |
| 76 | + color: danger |
| 77 | + env: |
| 78 | + SLACK_BOT_TOKEN: ${{ secrets.DEV_SLACK_BOT_TOKEN }} |
| 79 | + |
| 80 | + docs: |
| 81 | + name: Documentation |
| 82 | + runs-on: ubuntu-latest |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v2 |
| 85 | + - uses: julia-actions/setup-julia@v1 |
| 86 | + with: |
| 87 | + version: '1' |
| 88 | + - run: | |
| 89 | + git config --global user.name name |
| 90 | + git config --global user.email email |
| 91 | + git config --global github.user username |
| 92 | + - run: | |
| 93 | + julia --project=docs -e ' |
| 94 | + using Pkg; |
| 95 | + Pkg.develop(PackageSpec(path=pwd())); |
| 96 | + Pkg.instantiate(); |
| 97 | + include("docs/make.jl");' |
| 98 | + env: |
| 99 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 100 | + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
0 commit comments