|
| 1 | +name: CI |
| 2 | + |
| 3 | +# Run on master, tags, or any pull request |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [master] |
| 7 | + tags: ["*"] |
| 8 | + pull_request: |
| 9 | + |
| 10 | +jobs: |
| 11 | + |
| 12 | + # unit tests with coverage |
| 13 | + test: |
| 14 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + version: |
| 20 | + - "1.0" # LTS |
| 21 | + - "1" # Latest Release |
| 22 | + os: |
| 23 | + - ubuntu-latest |
| 24 | + arch: |
| 25 | + - x64 |
| 26 | + steps: |
| 27 | + |
| 28 | + # check out the project and install Julia |
| 29 | + - uses: actions/checkout@v2 |
| 30 | + - uses: julia-actions/setup-julia@v1 |
| 31 | + with: |
| 32 | + version: ${{ matrix.version }} |
| 33 | + arch: ${{ matrix.arch }} |
| 34 | + |
| 35 | + # using a cache can speed up execution times |
| 36 | + - uses: actions/cache@v2 |
| 37 | + env: |
| 38 | + cache-name: cache-artifacts |
| 39 | + with: |
| 40 | + path: ~/.julia/artifacts |
| 41 | + key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
| 42 | + restore-keys: | |
| 43 | + ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}- |
| 44 | + ${{ runner.os }}-${{ matrix.arch }}-test- |
| 45 | + ${{ runner.os }}-${{ matrix.arch }}- |
| 46 | + ${{ runner.os }}- |
| 47 | +
|
| 48 | + # build the depencies, run the tests, and upload coverage results |
| 49 | + - uses: julia-actions/julia-buildpkg@latest |
| 50 | + - run: | |
| 51 | + git config --global user.name Tester |
| 52 | + git config --global user.email [email protected] |
| 53 | + - name: Run Tests |
| 54 | + uses: julia-actions/julia-runtest@latest |
| 55 | + - uses: julia-actions/julia-processcoverage@v1 |
| 56 | + - uses: codecov/codecov-action@v1 |
| 57 | + with: |
| 58 | + file: ./lcov.info |
| 59 | + flags: unittests |
| 60 | + name: codecov-umbrella |
0 commit comments