diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89213ff..1f32dff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,17 +17,42 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: + # Step 1: Check out the repository - uses: actions/checkout@v4 - # This will run on all specified operating systems + # Step 2: Set up Julia (only on Ubuntu, as Julia setup might not be available for all OSes directly) + - name: Set up Julia + if: matrix.os == 'ubuntu-latest' + uses: julia-actions/setup-julia@v1.5 + with: + version: '1.10' + + # Step 3: Install dependencies (only run on Ubuntu) + - name: Install dependencies + if: matrix.os == 'ubuntu-latest' + run: julia -e 'using Pkg; Pkg.instantiate()' + + # Step 4: Run tests with coverage (only run on Ubuntu) + - name: Run tests with coverage + if: matrix.os == 'ubuntu-latest' + run: julia --project=. -e 'using Pkg; Pkg.test(coverage=true)' + + # Step 5: Upload coverage to Codecov (only run on Ubuntu) + - name: Upload coverage to Codecov + if: matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} # Only needed for private repos + files: ./coverage/lcov.info # Path to your coverage report (adjust if needed) + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true + + # Step 6: Run additional commands on all specified operating systems - name: Run a one-line script run: echo Hello, world! Running on ${{ matrix.os }} - # Run multiple commands as part of the CI process - name: Run a multi-line script run: | echo Add other actions to build, echo test, and deploy your project on ${{ matrix.os }} - - -