From 2e52c267a3d39fef2b4221656361fc23f06e141e Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Tue, 8 Dec 2020 23:26:06 +0100 Subject: [PATCH] Add basic end-to-end test (#26) (see #25) --- .github/workflows/ci.yml | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d77245c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,76 @@ +name: CI + +on: + push: + branches: + - "main" + - "master" + pull_request: + +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "1.0" + - "1" # automatically expands to the latest stable 1.x release of Julia + - nightly + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + - x86 + # 32-bit Julia binaries are not available on macOS + exclude: + - os: macOS-latest + arch: x86 + + steps: + - name: Checkout Example.jl + uses: actions/checkout@v2 + with: + repository: julia-actions/Example.jl + + - name: Verify that test output file does not exist yet + run: test ! -f "$HOME/julia-runtest" + shell: bash + + - name: Checkout julia-runtest + uses: actions/checkout@v2 + with: + path: ./.github/actions/julia-runtest + + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + + - uses: actions/cache@v1 + 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 }}- + + - uses: julia-actions/julia-buildpkg@v1 + + - uses: ./.github/actions/julia-runtest + + - uses: julia-actions/julia-processcoverage@v1 + + - uses: codecov/codecov-action@v1 + with: + file: lcov.info + + - name: Verify that test output file exists + run: test -f "$HOME/julia-runtest" + shell: bash