|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + paths-ignore: |
| 7 | + - 'LICENSE.md' |
| 8 | + - 'README.md' |
| 9 | + - '.github/workflows/TagBot.yml' |
| 10 | + push: |
| 11 | + branches: |
| 12 | + - master |
| 13 | + tags: '*' |
| 14 | + paths-ignore: |
| 15 | + - 'LICENSE.md' |
| 16 | + - 'README.md' |
| 17 | + - '.github/workflows/TagBot.yml' |
| 18 | +jobs: |
| 19 | + test: |
| 20 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + version: |
| 26 | + - '1.2' |
| 27 | + - '1' |
| 28 | + - 'nightly' |
| 29 | + os: |
| 30 | + - ubuntu-latest |
| 31 | + arch: |
| 32 | + - x64 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v2 |
| 35 | + - uses: julia-actions/setup-julia@v1 |
| 36 | + with: |
| 37 | + version: ${{ matrix.version }} |
| 38 | + arch: ${{ matrix.arch }} |
| 39 | + - uses: actions/cache@v1 |
| 40 | + env: |
| 41 | + cache-name: cache-artifacts |
| 42 | + with: |
| 43 | + path: ~/.julia/artifacts |
| 44 | + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
| 45 | + restore-keys: | |
| 46 | + ${{ runner.os }}-test-${{ env.cache-name }}- |
| 47 | + ${{ runner.os }}-test- |
| 48 | + ${{ runner.os }}- |
| 49 | + - uses: julia-actions/julia-buildpkg@v1 |
| 50 | + - uses: julia-actions/julia-runtest@v1 |
| 51 | + - uses: julia-actions/julia-processcoverage@v1 |
| 52 | + - uses: codecov/codecov-action@v1 |
| 53 | + with: |
| 54 | + file: lcov.info |
| 55 | + docs: |
| 56 | + name: Documentation |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v2 |
| 60 | + - uses: julia-actions/setup-julia@v1 |
| 61 | + with: |
| 62 | + version: '1' |
| 63 | + - run: | |
| 64 | + julia --project=docs -e ' |
| 65 | + using Pkg |
| 66 | + Pkg.develop(PackageSpec(path=pwd())) |
| 67 | + Pkg.instantiate()' |
| 68 | + - run: | |
| 69 | + julia --project=docs -e ' |
| 70 | + import Documenter: doctest, DocMeta |
| 71 | + using LegendrePolynomials |
| 72 | + DocMeta.setdocmeta!(LegendrePolynomials, :DocTestSetup, :(using LegendrePolynomials); recursive=true) |
| 73 | + doctest(LegendrePolynomials)' |
| 74 | + - run: julia --project=docs docs/make.jl |
| 75 | + env: |
| 76 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
0 commit comments