diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6db645b..8e40b12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,38 +1,39 @@ -# This is a basic workflow to help you get started with Actions - name: CI - -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main" ] + branches: [master] pull_request: - branches: [ "main" ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel + types: [opened, synchronize, reopened] jobs: test: - runs-on: ubuntu-latest - + name: Julia ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - version: '1.8' + os: ubuntu-latest + arch: x64 steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Julia 1.8 - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 with: - julia-version: 1.8 - project: . - - - name: Install dependencies and run tests - run: | - julia --color=yes -e 'import Pkg; Pkg.build()' - julia --color=yes -e 'import Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.test()' - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info \ No newline at end of file