Skip to content

Commit

Permalink
Change registry from General to Green (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
artememelin committed Jun 4, 2024
1 parent d512f03 commit 58688ea
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 88 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,29 @@ on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
CompatHelper:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
- name: Configure CompatHelper
run: |
julia -e '
using Pkg
Pkg.add("CompatHelper")
using CompatHelper
CompatHelper.main(use_existing_registries = true)
'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
GITHUB_TOKEN: ${{ github.token }} # Token required to create a pull request to the same repository

51 changes: 51 additions & 0 deletions .github/workflows/Coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1'
- '1.8'
- '1.9'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
34 changes: 34 additions & 0 deletions .github/workflows/DocPreviewCleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
concurrency:
group: doc-preview-cleanup
cancel-in-progress: false

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "${preview_dir}" ]; then
git config user.name "Documenter.jl"
git config user.email "documenter@juliadocs.github.io"
git rm -rf "${preview_dir}"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
preview_dir: previews/PR${{ github.event.number }}

56 changes: 9 additions & 47 deletions .github/workflows/CI.yml → .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,12 @@
name: CI
name: Documenter

on:
push:
branches:
- master
tags: ['*']
tags: [v*]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1'
- '1.8'
- '1.9'
- '1.10'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info

docs:
Documenter:
permissions:
contents: write
statuses: write
Expand All @@ -58,10 +16,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/cache@v2
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(; path = pwd())); Pkg.instantiate();'
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path = pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -78,4 +40,4 @@ jobs:
body: ':blue_book: A preview of the documentation will be [here](${{env.preview_url}}) soon'
})
env:
preview_url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/previews/PR${{ github.event.number }}/
preview_url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/previews/PR${{ github.event.number }}/
60 changes: 60 additions & 0 deletions .github/workflows/Registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Update registry

on:
push:
branches:
- master
workflow_dispatch:

jobs:
registry:
name: Update registry
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: julia-actions/add-julia-registry@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
registry: bhftbootcamp/Green
- uses: julia-actions/setup-julia@v2
with:
version: 1.9
- uses: julia-actions/cache@v2
- name: Configure Git
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq git
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
- name: Updating package version in registers
run: |
julia -e '
using Pkg
Pkg.add("LocalRegistry")
Pkg.develop(url = "git@github.com:${{ github.repository }}.git")
using LocalRegistry
using TOML
package_name = match(r"^.*/(.*?)(\.jl)?(\.git)?$", "${{ github.repository }}")
package_name == nothing && error("Invalid package name: ${{ github.repository }}")
package_name = package_name[1]

package_dir = joinpath(DEPOT_PATH[1], "dev", package_name)
project_toml = TOML.parsefile(joinpath(package_dir, "Project.toml"))
version = VersionNumber(project_toml["version"])

LocalRegistry.register(
package_name,
repo = "https://github.com/${{ github.repository }}.git",
registry = "git@github.com:bhftbootcamp/Green.git",
ignore_reregistration = true,
)

run(Cmd(`git tag -f "v$version"`, dir = package_dir))
run(Cmd(`git push --force origin "v$version"`, dir = package_dir))
'
26 changes: 26 additions & 0 deletions .github/workflows/ReleaseTag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create release

on:
push:
tags:
- v*
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Release pushed tag
runs-on: ubuntu-latest
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="v${tag#v}" \
--generate-notes
31 changes: 0 additions & 31 deletions .github/workflows/TagBot.yml

This file was deleted.

9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bhftbootcamp.github.io/AgTable.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bhftbootcamp.github.io/AgTable.jl/dev/)
[![Build Status](https://github.com/bhftbootcamp/AgTable.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/bhftbootcamp/AgTable.jl/actions/workflows/CI.yml?query=branch%3Amaster)
[![Build Status](https://github.com/bhftbootcamp/AgTable.jl/actions/workflows/Coverage.yml/badge.svg?branch=master)](https://github.com/bhftbootcamp/AgTable.jl/actions/workflows/Coverage.yml?query=branch%3Amaster)
[![Coverage](https://codecov.io/gh/bhftbootcamp/AgTable.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/bhftbootcamp/AgTable.jl)
[![Registry](https://img.shields.io/badge/registry-General-4063d8)](https://github.com/JuliaRegistries/General)
[![Registry](https://img.shields.io/badge/registry-Green-green)](https://github.com/bhftbootcamp/Green)

AgTable is an easy-to-use wrapper for the [AG Grid](https://www.ag-grid.com/) library, designed for quick visualization and easy sharing of tabular data.

## Installation
If you haven't installed our [local registry](https://github.com/bhftbootcamp/Green) yet, do that first:
```
] registry add https://github.com/bhftbootcamp/Green.git
```

To install AgTable, simply use the Julia package manager:

```julia
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ table = ag_table(
header_name = "Exchange Rate",
filter = true,
formatter = AGFormatter(style = AG_PERCENT),
threshold = AGThreshold(0.0, color_down = "#8ac926", color_up = "#ff595e"),
threshold = AGThreshold(0.0, color_down = "#ff595e", color_up = "#8ac926"),
),
AgNumberColumnDef(
field_name = "market_cap",
Expand Down

0 comments on commit 58688ea

Please sign in to comment.