diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..41a56c3 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,69 @@ +name: CI +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: + version: + - '1.0' + - '1' + - 'nightly' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + 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 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + file: lcov.info + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1.3' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.add(PackageSpec(url="https://github.com/Arkoniak/Documenter.jl", rev="repo_url")); + Pkg.instantiate()' + - run: | + julia --project=docs -e ' + using Documenter: DocMeta, doctest + using ParallelKMeans + DocMeta.setdocmeta!(ParallelKMeans, :DocTestSetup, :(using ParallelKMeans); recursive=true) + doctest(ParallelKMeans)' + - run: julia --project=docs docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 1684997..02fa416 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -2,11 +2,11 @@ name: CompatHelper on: schedule: - - cron: '00 00 * * *' + - cron: '0 0 * * *' + workflow_dispatch: push: branches: - actions/trigger/CompatHelper - jobs: CompatHelper: runs-on: ubuntu-latest @@ -15,15 +15,9 @@ jobs: with: version: 1.4 - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' + run: julia -e 'using Pkg; Pkg.add("CompatHelper"); Pkg.resolve()' - name: CompatHelper.main() env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: >- - julia -e ' - using CompatHelper; - CompatHelper.main() do; - run(`julia --project=test/environments/main -e "import Pkg; Pkg.instantiate(); Pkg.update()"`); - run(`julia --project=docs -e "import Pkg; Pkg.instantiate(); Pkg.update()"`); - end - ' + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + run: julia -e 'using CompatHelper; CompatHelper.main() ' diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index d77d3a0..f49313b 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,11 +1,15 @@ name: TagBot on: - schedule: - - cron: 0 * * * * + issue_comment: + types: + - created + workflow_dispatch: jobs: TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' runs-on: ubuntu-latest steps: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 82ec229..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux - - osx -julia: - - 1.3 - - 1.4 - - 1.5 - - nightly -after_success: - - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())' -jobs: - allow_failures: - - julia: nightly - fast_finish: true - include: - - stage: Documentation - julia: 1.5 - script: julia --project=docs -e ' - using Pkg; - Pkg.develop(PackageSpec(path=pwd())); - Pkg.instantiate(); - include("docs/make.jl");' - after_success: skip -notifications: - email: false diff --git a/docs/make.jl b/docs/make.jl index 0a3ac7c..198c039 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,14 +2,18 @@ using Documenter, ParallelKMeans makedocs(; modules=[ParallelKMeans], - format=Documenter.HTML(), + authors="Bernard Brenyah & Andrey Oskin", + repo="https://github.com/PyDataBlog/ParallelKMeans.jl/blob/{commit}{path}#L{line}", + sitename="ParallelKMeans.jl", + format=Documenter.HTML( + prettyurls=get(ENV, "CI", "false") == "true", + canonical="https://PyDataBlog.github.io/ParallelKMeans.jl", + siteurl="https://github.com/PyDataBlog/ParallelKMeans.jl", + assets=String[], + ), pages=[ "Home" => "index.md", ], - repo="https://github.com/PyDataBlog/ParallelKMeans.jl/blob/{commit}{path}#L{line}", - sitename="ParallelKMeans.jl", - authors="Bernard Brenyah & Andrey Oskin", - assets=String[], ) deploydocs(;