Skip to content

Commit

Permalink
Add CI linting job
Browse files Browse the repository at this point in the history
  • Loading branch information
shonfeder committed Jan 1, 2025
1 parent 8ab734a commit 83906c4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Adapted from https://github.com/ocaml/setup-ocaml
#
name: ci

# The lints should be only run when packages are added
on:
pull_request:
paths:
- packages/
push:
paths:
- packages/

permissions: read-all

concurrency:
group: deploy-odoc
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout tree
uses: actions/checkout@v4

- name: Install GNU prallel
run: sudo apt-get install -y parallel

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5

- name: Install opam-ci-check
- run: opam pin opam-ci-check https://github.com/shonfeder/opam-repo-ci.git#411/archive-lint

# Get the names of the packages being added to the archive, and feed these
# to opam-ci-check
- name: Lint newly archived packages
- run: git diff --name-only main | sed 's:.*/\(.*\)/opam:\1:' | parallel opam exec -- opam-ci-check lint -r . --checks=archive-repo

0 comments on commit 83906c4

Please sign in to comment.