Skip to content

Commit 0e0ad7c

Browse files
authored
GitHub actions (#13)
* Added GitHub actions * Improved debugging output
1 parent fbe3d41 commit 0e0ad7c

20 files changed

+762
-101
lines changed

.github/workflows/TagBot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
#
2+
# Create new tagged Julia package releases.
3+
#
4+
15
name: TagBot
26
on:
37
issue_comment:
48
types:
59
- created
610
workflow_dispatch:
11+
712
jobs:
813
TagBot:
914
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

.github/workflows/compathelper.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# Package must have version compatibility set before it can be registered.
3+
#
4+
# https://github.com/JuliaRegistries/General/blob/master/README.md
5+
# https://github.com/JuliaRegistries/CompatHelper.jl
6+
# https://juliaregistries.github.io/CompatHelper.jl/dev/
7+
8+
# Contents should match here: https://github.com/JuliaRegistries/CompatHelper.jl/blob/master/.github/workflows/CompatHelper.yml
9+
10+
name: CompatHelper
11+
on:
12+
schedule:
13+
- cron: 0 0 * * *
14+
workflow_dispatch:
15+
16+
jobs:
17+
CompatHelper:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: "Install CompatHelper"
21+
run: |
22+
import Pkg
23+
name = "CompatHelper"
24+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
25+
version = "2"
26+
Pkg.add(; name, uuid, version)
27+
shell: julia --color=yes {0}
28+
- name: "Run CompatHelper"
29+
run: |
30+
import CompatHelper
31+
CompatHelper.main()
32+
shell: julia --color=yes {0}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
36+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/document.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Generate Documenter documentation.
3+
#
4+
# https://github.com/marketplace/actions/deploy-package-documentation
5+
#
6+
# ***** You need DOCUMENTER_KEY and a deployment key for deployement, which you can generate using DocumenterTools:
7+
#
8+
# ***** julia> using DocumenterTools, YourPackage
9+
# ***** julia> DocumenterTools.genkeys(YourPackage)
10+
#
11+
# The output of this command will contain both keys as well as instructions on deploying the keys.
12+
#
13+
# ***** NOTE: GitHub pages must be enabled in the project settings.
14+
#
15+
# URL is usually https://USERNAME.github.io/PROJECT/dev/.
16+
17+
name: Documenter
18+
on:
19+
push:
20+
branches: [main]
21+
tags: [v*]
22+
pull_request:
23+
24+
jobs:
25+
Documenter:
26+
name: Documentation
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: julia-actions/setup-julia@v1
31+
with:
32+
version: 1
33+
- uses: julia-actions/julia-buildpkg@latest
34+
- run: julia --project=docs -e 'import Pkg; Pkg.add("Documenter")'
35+
- uses: julia-actions/julia-docdeploy@latest
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
39+
# Sets the environment to pull secrets from
40+
environment: documenter

.github/workflows/register.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Register the package in the official Julia repository.
3+
#
4+
# ***** Follow the directions here: https://github.com/JuliaRegistries/Registrator.jl
5+
6+
name: Register Package
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: Version to register or component to bump
12+
required: true
13+
14+
jobs:
15+
register:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: julia-actions/RegisterAction@latest
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# Run unit tests.
3+
#
4+
# https://github.com/marketplace/actions/run-julia-package-tests
5+
6+
name: Run Tests
7+
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
workflow_dispatch:
13+
14+
jobs:
15+
test:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
julia-version: ['1.5', '1', 'nightly']
20+
julia-arch: [x64, x86]
21+
os: [ubuntu-latest, windows-latest, macOS-latest]
22+
exclude:
23+
- os: macOS-latest
24+
julia-arch: x86
25+
# Sets the environment to pull secrets from
26+
environment: tests
27+
28+
steps:
29+
- name: "Configure credentials"
30+
shell: bash
31+
run: mkdir -p ~/.julia/config/google_sheets/ && echo "${{ secrets.GOOGLE_SHEETS_CREDENTIALS }}" > ~/.julia/config/google_sheets/credentials.json
32+
- uses: actions/checkout@v2
33+
- uses: julia-actions/setup-julia@v1
34+
with:
35+
version: ${{ matrix.julia-version }}
36+
- uses: julia-actions/julia-buildpkg@v1
37+
- uses: julia-actions/julia-runtest@v1
38+
env:
39+
SPREADSHEET_ID: ${{ secrets.SPREADSHEET_ID }}
40+
- uses: julia-actions/julia-processcoverage@v1
41+
- uses: codecov/codecov-action@v1
42+
with:
43+
file: lcov.info

Manifest.toml

+20-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
55

66
[[CategoricalArrays]]
77
deps = ["DataAPI", "Future", "JSON", "Missings", "Printf", "Statistics", "StructTypes", "Unicode"]
8-
git-tree-sha1 = "5861101791fa76fafe8dddefd70ffbfe4e33ecae"
8+
git-tree-sha1 = "f4de3fab632544ff0a858f293755fe9aac0f47bf"
99
uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597"
10-
version = "0.9.0"
10+
version = "0.9.6"
1111

1212
[[ColorTypes]]
1313
deps = ["FixedPointNumbers", "Random"]
@@ -23,9 +23,9 @@ version = "0.12.6"
2323

2424
[[Compat]]
2525
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
26-
git-tree-sha1 = "919c7f3151e79ff196add81d7f4e45d91bbf420b"
26+
git-tree-sha1 = "ac4132ad78082518ec2037ae5770b6e796f7f956"
2727
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
28-
version = "3.25.0"
28+
version = "3.27.0"
2929

3030
[[Conda]]
3131
deps = ["JSON", "VersionParsing"]
@@ -39,9 +39,9 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
3939
version = "4.0.4"
4040

4141
[[DataAPI]]
42-
git-tree-sha1 = "ad84f52c0b8f05aa20839484dbaf01690b41ff84"
42+
git-tree-sha1 = "dfb3b7e89e395be1e25c2ad6d7690dc29cc53b1d"
4343
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
44-
version = "1.4.0"
44+
version = "1.6.0"
4545

4646
[[DataFrames]]
4747
deps = ["CategoricalArrays", "Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
@@ -135,23 +135,23 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
135135

136136
[[Missings]]
137137
deps = ["DataAPI"]
138-
git-tree-sha1 = "ed61674a0864832495ffe0a7e889c0da76b0f4c8"
138+
git-tree-sha1 = "f8c673ccc215eb50fcadb285f522420e29e69e1c"
139139
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
140-
version = "0.4.4"
140+
version = "0.4.5"
141141

142142
[[Mmap]]
143143
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
144144

145145
[[OrderedCollections]]
146-
git-tree-sha1 = "cf59cfed2e2c12e8a2ff0a4f1e9b2cd8650da6db"
146+
git-tree-sha1 = "4fa2ba51070ec13fcc7517db714445b4ab986bdf"
147147
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
148-
version = "1.3.2"
148+
version = "1.4.0"
149149

150150
[[Parsers]]
151151
deps = ["Dates"]
152-
git-tree-sha1 = "b417be52e8be24e916e34b3d70ec2da7bdf56a68"
152+
git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc"
153153
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
154-
version = "1.0.12"
154+
version = "1.1.0"
155155

156156
[[Pkg]]
157157
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
@@ -189,11 +189,9 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
189189

190190
[[RateLimiter]]
191191
deps = ["Dates"]
192-
git-tree-sha1 = "68bf91040a1ed1575534b37b9f0538378f8e4ca6"
193-
repo-rev = "main"
194-
repo-url = "[email protected]:chipkent/RateLimiter.jl.git"
192+
git-tree-sha1 = "a3912eca5eab1506d6c1f194f4b04d7293fbb816"
195193
uuid = "24b76ae0-009b-4410-993f-7a05b90d7239"
196-
version = "0.1.0"
194+
version = "0.1.3"
197195

198196
[[Reexport]]
199197
deps = ["Pkg"]
@@ -230,21 +228,21 @@ uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
230228

231229
[[StructTypes]]
232230
deps = ["Dates", "UUIDs"]
233-
git-tree-sha1 = "d94235fcdc4a09649f263365c5f7e4ed4ba6ed34"
231+
git-tree-sha1 = "e36adc471280e8b346ea24c5c87ba0571204be7a"
234232
uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
235-
version = "1.2.1"
233+
version = "1.7.2"
236234

237235
[[TableTraits]]
238236
deps = ["IteratorInterfaceExtensions"]
239-
git-tree-sha1 = "b1ad568ba658d8cbb3b892ed5380a6f3e781a81e"
237+
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
240238
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
241-
version = "1.0.0"
239+
version = "1.0.1"
242240

243241
[[Tables]]
244242
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
245-
git-tree-sha1 = "240d19b8762006ff04b967bdd833269ad642d550"
243+
git-tree-sha1 = "c9d2d262e9a327be1f35844df25fe4561d258dc9"
246244
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
247-
version = "1.2.2"
245+
version = "1.4.2"
248246

249247
[[Test]]
250248
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]

README.md

+45-32
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,48 @@
1+
<!-- ![Test](https://github.com/chipkent/GoogleSheets.jl/actions/workflows/test.yml/badge.svg) -->
2+
![Register](https://github.com/chipkent/GoogleSheets.jl/actions/workflows/register.yml/badge.svg)
3+
![Document](https://github.com/chipkent/GoogleSheets.jl/actions/workflows/document.yml/badge.svg)
4+
![Compat Helper](https://github.com/chipkent/GoogleSheets.jl/actions/workflows/compathelper.yml/badge.svg)
5+
![Tagbot](https://github.com/chipkent/GoogleSheets.jl/actions/workflows/tagbot.yml/badge.svg)
6+
17
# GoogleSheets.jl
28

3-
Julia package for working with Google Sheets.
9+
Julia package for working with Google Sheets. You can perform expected actions such as adding sheets,
10+
removing sheets, reading from sheets, writing to sheets, and formatting sheets.
411

512
Key types:
6-
* GoogleSheetsClient
7-
* Spreadsheet
8-
* Sheet
9-
* CellRange
10-
* CellRanges
11-
* CellRangeValues
12-
* UpdateSummary
13-
* CellIndexRange1D
14-
* CellIndexRange2D
15-
* CellFormat
16-
* DataFrame
13+
* `GoogleSheetsClient`
14+
* `Spreadsheet`
15+
* `Sheet`
16+
* `CellRange`
17+
* `CellRanges`
18+
* `CellRangeValues`
19+
* `UpdateSummary`
20+
* `CellIndexRange1D`
21+
* `CellIndexRange2D`
22+
* `CellFormat`
23+
* `DataFrame`
1724

1825
Key functions:
19-
* sheets_client
20-
* sheet_names
21-
* sheets
22-
* batch_update!
23-
* add_sheet!
24-
* delete_sheet!
25-
* freeze!
26-
* append!
27-
* insert_rows!
28-
* insert_cols!
29-
* delete_rows!
30-
* delete_cols!
31-
* meta
32-
* show
33-
* get
34-
* update!
35-
* clear!
36-
* format!
37-
* format_conditional!
38-
* format_color_gradient!
26+
* `sheets_client`
27+
* `sheet_names`
28+
* `sheets`
29+
* `batch_update!`
30+
* `add_sheet!`
31+
* `delete_sheet!`
32+
* `freeze!`
33+
* `append!`
34+
* `insert_rows!`
35+
* `insert_cols!`
36+
* `delete_rows!`
37+
* `delete_cols!`
38+
* `meta`
39+
* `show`
40+
* `get`
41+
* `update!`
42+
* `clear!`
43+
* `format!`
44+
* `format_conditional!`
45+
* `format_color_gradient!`
3946

4047
To use:
4148
1. Create a Google Sheets API token from either the [python quick start reference](https://developers.google.com/sheets/api/quickstart/python) or the [developers console](https://console.developers.google.com/apis/credentials).
@@ -160,3 +167,9 @@ delete_cols!(client, CellIndexRange1D(Sheet(client, sheet, "test sheet"), 2, 3))
160167

161168
clear!(client, CellRange(sheet, "test sheet!B2:C3"))
162169
```
170+
171+
## Documentation
172+
173+
See [https://chipkent.github.io/GoogleSheets.jl/dev/](https://chipkent.github.io/GoogleSheets.jl/dev/).
174+
175+
Pull requests will publish documentation to <code>https://chipkent.github.io/GoogleSheets.jl/previews/PR##</code>.

docs/make.jl

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
using Documenter, GoogleSheets
3+
4+
makedocs(
5+
modules = [GoogleSheets],
6+
sitename="GoogleSheets.jl",
7+
authors = "Chip Kent",
8+
format = Documenter.HTML(),
9+
)
10+
11+
deploydocs(
12+
repo = "github.com/chipkent/GoogleSheets.jl.git",
13+
devbranch = "main",
14+
push_preview = true,
15+
)

0 commit comments

Comments
 (0)