Skip to content

Commit

Permalink
Merge pull request #1 from Flexiana/add-ci
Browse files Browse the repository at this point in the history
Add CI pipeline
  • Loading branch information
staifa authored Apr 12, 2023
2 parents 4248edd + a2cb715 commit 4caa217
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 10 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint, test, build and deploy

on:
workflow_dispatch:
push:

jobs:
ci-pipeline:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Clojure
uses: DeLaGuardo/[email protected]
with:
cli: 1.11.1.1113

- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
key: cljdeps-${{ hashFiles('deps.edn') }}
restore-keys: cljdeps-

- name: Run CI pipeline
run: ./bin/ci

- name: Deploy to Clojars
if: startsWith(github.ref, 'refs/tags/v')
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_LOGIN }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
run: ./bin/deploy
2 changes: 1 addition & 1 deletion bin/ci
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -T:build ci
clojure -T:build ci
2 changes: 1 addition & 1 deletion bin/coverage
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -M:coverage
clojure -M:coverage
2 changes: 1 addition & 1 deletion bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ elif [ -z "${CLOJARS_PASSWORD}" ]; then
echo "CLOJARS_PASSWORD env var is not set"
exit 1
else
clj -T:build deploy
clojure -T:build deploy
fi
4 changes: 2 additions & 2 deletions bin/lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh
clj -M:kondo
clj -M:eastwood
clojure -M:kondo
clojure -M:eastwood
2 changes: 1 addition & 1 deletion bin/local-install
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -T:build local-install
clojure -T:build local-install
2 changes: 1 addition & 1 deletion bin/nrepl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -M:nrepl "$@"
clojure -M:nrepl "$@"
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -X:test "$@"
clojure -X:test "$@"
2 changes: 1 addition & 1 deletion bin/test-ns
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -X:test :nses ["$@"]
clojure -X:test :nses ["$@"]
2 changes: 1 addition & 1 deletion bin/test-var
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
clj -X:test :vars ["$@"]
clojure -X:test :vars ["$@"]

0 comments on commit 4caa217

Please sign in to comment.