diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..9818139 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,51 @@ +name: CI +on: + pull_request: + push: + branches: + - master + tags: '*' +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "1" + - "1.0" + - nightly + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + use_miniforge: [yes] + steps: + - uses: actions/checkout@v2 + - 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 + env: + CONDA_JL_USE_MINIFORGE: ${{ matrix.use_miniforge }} + - uses: julia-actions/julia-runtest@v1 + env: + CONDA_JL_USE_MINIFORGE: ${{ matrix.use_miniforge }} + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 45cacd4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: julia -os: - - osx - - linux -julia: - - 1.0 - - 1.1 - - 1.2 - - 1.3 - - nightly -env: - - CONDA_JL_VERSION="2" - - CONDA_JL_VERSION="3" - - CONDA_JL_VERSION="3" CONDA_JL_USE_MINIFORGE="yes" - -notifications: - email: false - -# Workaround for https://github.com/travis-ci/travis-ci/issues/4942 -git: - depth: 99999 diff --git a/README.md b/README.md index 511612f..3cfc7f2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Conda.jl -[](https://travis-ci.org/JuliaPy/Conda.jl) -[](https://ci.appveyor.com/project/StevenGJohnson/conda-jl) +[](https://github.com/JuliaPy/Conda.jl/actions/workflows/CI.yml) This package allows one to use [conda](http://conda.pydata.org/) as a cross-platform binary provider for Julia for other Julia packages, especially to install binaries that have complicated dependencies diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 4d2092d..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,47 +0,0 @@ -environment: - matrix: - - julia_version: 1 - - julia_version: 1.1 - - julia_version: 1.2 - - julia_version: 1.3 - - julia_version: nightly - -platform: - - x86 # 32-bit - - x64 # 64-bit - -# # Uncomment the following lines to allow failures on nightly julia -# # (tests will run but not make your overall status red) -# matrix: -# allow_failures: -# - julia_version: nightly - -branches: - only: - - master - - /release-.*/ - -# notifications: -# - provider: Email -# on_build_success: false -# on_build_failure: true -# on_build_status_changed: true - -install: - - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1")) - -build_script: - - echo "%JL_BUILD_SCRIPT%" - - SET HOME=%userprofile%\Conda test home - - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%" - -test_script: - - echo "%JL_TEST_SCRIPT%" - - SET HOME=%userprofile%\Conda test home - - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%" - -# # Uncomment to support code coverage upload. Should only be enabled for packages -# # which would have coverage gaps without running on Windows -# on_success: -# - echo "%JL_CODECOV_SCRIPT%" -# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%" diff --git a/test/runtests.jl b/test/runtests.jl index 184fa0f..066eee5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -15,31 +15,33 @@ end env = :test_conda_jl rm(Conda.prefix(env); force=true, recursive=true) -@test Conda.exists("curl", env) -Conda.add("curl", env) - @testset "Install Python package" begin Conda.add("python", env) pythonpath = joinpath(Conda.python_dir(env), "python" * exe) @test isfile(pythonpath) - cmd = Conda._set_conda_env(`$pythonpath -c "import zmq"`, env) + cmd = Conda._set_conda_env(`$pythonpath -c "import six"`, env) @test_throws Exception run(cmd) - Conda.add("pyzmq", env) + Conda.add("six", env) run(cmd) end -curlvers = Conda.version("curl",env) -@test curlvers >= v"5.0" -@test Conda.exists("curl==$curlvers", env) +@testset "Install executable package" begin + @test Conda.exists("curl", env) + Conda.add("curl", env) + + curlvers = Conda.version("curl",env) + @test curlvers >= v"1.0" + @test Conda.exists("curl==$curlvers", env) -curl_path = joinpath(Conda.bin_dir(env), "curl" * exe) -@test isfile(curl_path) + curl_path = joinpath(Conda.bin_dir(env), "curl" * exe) + @test isfile(curl_path) -@test "curl" in Conda.search("cu*", env) + @test "curl" in Conda.search("cu*", env) -Conda.rm("curl", env) -@test !isfile(curl_path) + Conda.rm("curl", env) + @test !isfile(curl_path) +end pythonpath = joinpath(Conda.PYTHONDIR, "python" * exe) @test isfile(pythonpath)