Skip to content

GitHub Action for checking that CljDoc will be able to analyze the project successfully

License

Notifications You must be signed in to change notification settings

cljdoc/cljdoc-check-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CljDoc Check Action

GitHub Action for checking that CljDoc will be able to analyze the project successfully

NOTE: Currently it only checks for successful analysis of the source codes. Import of articles is not verified yet.

IMPORTANT: CljDoc only works on the JAR archive of the library so you need to build it first.

Checking a clojure-deps based library is as simple as:

name: Check Cljdoc
on: [pull_request]
jobs:
  check-cljdoc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name Build target/<the lib>*.jar so that CljDoc analyze can use it:
        run: clojure -T:build jar # REPLACE with whatever you do to build your jar
      - name: CljDoc Check
          uses: cljdoc/cljdoc-check-action@v1

For other types of libraries, you need to install these into the local Maven repository (e.g. via lein install) and pass it the Maven coordinate and version:

# inside jobs.<name>.steps
- run: lein install # or whatever is suitable for your build tool/project, to install the library into a maven repo
- name: CljDoc Check
    uses: cljdoc/cljdoc-check-action@v1
    with:
      mvn_project: io.aviso/pretty
      mvn_version: LATEST # this is the default

Development

The cljdoc changes supporting this action were originally introduced in cljdoc/cljdoc-analyzer#44

Running the action locally:

cljdoc-check-action$ docker build -t cljdoc-check-action .
cljdoc-check-action$ cd ../my-library; clojure -T:build jar
my-library$ docker run --rm -ti --volume `pwd`:/tmp/prj --workdir /tmp/prj cljdoc-check-action

About

GitHub Action for checking that CljDoc will be able to analyze the project successfully

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •