Skip to content

Commit

Permalink
Add documentation on running RegistryCI on a registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnarFarneback committed Jan 28, 2024
1 parent 767a706 commit 739927d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ will look for a package in the current directory.
* [Migrating Packages from the General Registry](docs/migration_from_general.md)
* [Using LocalRegistry on a Shared Filesysem](docs/shared_filesystem.md)
* [Delete a Registered Package](docs/delete_package.md)
* [Registry Consistency Testing](docs/registry_ci.md)
41 changes: 41 additions & 0 deletions docs/registry_ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Registry Consistency Testing

For trouble-shooting, or as good practice if you have your registry
set up with CI (Continuous Integration), you can run the registry
consistency tests from the
[RegistryCI](https://github.com/JuliaRegistries/RegistryCI.jl)
package on your registry.

In the following sections it is assumed that all packages in your
registry have all their dependencies registerad either in your own
registry or in the General registry, which is the typical scenario.

## Manual Testing

Add RegistryCI
```
pkg> add RegistryCI
```
and run the consistency tests:
```
using RegistryCI
withenv("JULIA_PKG_UNPACK_REGISTRY" => "true") do
RegistryCI.test(path_to_your_registry, registry_deps = ["General"])
end
```

## CI Testing

The idea is the same as for manual testing. A sample GitLab CI job for
your registry repository can look something like:
```
registry consistency test:
stage: test
variables:
JULIA_PKG_UNPACK_REGISTRY: "true"
script:
- git config --global user.name $GITLAB_USER_NAME
- git config --global user.email $GITLAB_USER_EMAIL
- julia -e 'using Pkg; Pkg.add("RegistryCI")'
- julia --color=yes -e 'using RegistryCI; RegistryCI.test(@__DIR__, registry_deps = ["General"])'
```

0 comments on commit 739927d

Please sign in to comment.