From 6e2eab42c7a7d23fccc78bd0c9dd22dd5659c17d Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 5 Jul 2022 09:42:26 -0500 Subject: [PATCH] Add unit testing workflow --- .github/workflows/UnitTests.yml | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/UnitTests.yml diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml new file mode 100644 index 0000000..2803b3f --- /dev/null +++ b/.github/workflows/UnitTests.yml @@ -0,0 +1,61 @@ +name: Unit Tests + +on: + - push + - pull_request + +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + julia-version: + - '1.6' + - '1' + - 'nightly' + julia-arch: + - x64 + - x86 + os: + - ubuntu-latest + - windows-latest + - macOS-latest + exclude: + - os: macOS-latest + julia-arch: x86 + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Julia + uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + - name: Cache artifacts + uses: actions/cache@v3 + env: + 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 }}- + - name: Build package + uses: julia-actions/julia-buildpkg@v1 + - name: Run tests + uses: julia-actions/julia-runtest@v1 + - name: Create CodeCov + uses: julia-actions/julia-processcoverage@v1 + - name: Upload CodeCov + uses: codecov/codecov-action@v1 + with: + file: lcov.info + flags: unittests + name: codecov-umbrella + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }}