Skip to content

Commit

Permalink
Merge pull request #6 from Cirru/update-workflow
Browse files Browse the repository at this point in the history
upgrade deps and switch to deps-library
  • Loading branch information
soyaine authored Jul 29, 2020
2 parents d0d150b + 1c31d5e commit 53f85dc
Show file tree
Hide file tree
Showing 9 changed files with 442 additions and 936 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

name: Deploy package

on:
release:
types: [created]

jobs:
deploy:
name: Deploy

runs-on: ubuntu-latest

steps:
- run: curl -O https://download.clojure.org/install/linux-install-1.10.1.507.sh && chmod +x linux-install-1.10.1.507.sh && sudo ./linux-install-1.10.1.507.sh

- uses: actions/checkout@v2

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
name: Cache node modules of yarn
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Clojars
uses: actions/cache@v1
env:
cache-name: cache-clojars
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('shadow-cljs.edn') }}
restore-keys: |
${{ runner.os }}-clojars
- name: run tests
run: 'yarn && yarn test'

- run: echo Working on ${{ github.ref }}

- name: deploy to clojars
run: env CLOJARS_USERNAME=jiyinyiyong CLOJARS_PASSWORD=${{ secrets.CLOJARS_PASSWORD }} clojure -A:release
40 changes: 40 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

name: Tests

on:
pull_request: {}
push:
branches:
- master

jobs:
upload-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://timbru31/java-node:latest

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
name: Cache node modules of yarn
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Clojars
uses: actions/cache@v1
env:
cache-name: cache-clojars
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('shadow-cljs.edn') }}
restore-keys: |
${{ runner.os }}-clojars
- run: yarn && yarn test
name: run test
23 changes: 0 additions & 23 deletions build.boot

This file was deleted.

4 changes: 1 addition & 3 deletions calcit.cirru
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

{} (:sessions $ {})
{}
:users $ {}
|Hy7M-_zef $ {} (:id |Hy7M-_zef) (:name |chen) (:nickname |chen) (:password |d41d8cd98f00b204e9800998ecf8427e) (:avatar nil) (:theme :star-trail)
:ir $ {} (:package |cirru-sepal)
Expand Down Expand Up @@ -677,6 +677,4 @@
|j $ {} (:type :leaf) (:text ||def) (:id |B1m0xhUZufgz) (:by |Hy7M-_zef) (:at 1511321940263)
|r $ {} (:type :leaf) (:text ||defonce) (:id |BkN0eh8Zuzgf) (:by |Hy7M-_zef) (:at 1511321940263)
:proc $ {} (:type :expr) (:id |H1Vxn8ZOGez) (:by |Hy7M-_zef) (:at 1511321940263) (:data $ {})
:saved-files $ {}
:configs $ {} (:storage-key |calcit.cirru) (:extension |.cljs) (:output |src) (:port 6001)
:repl $ {} (:alive? false) (:logs $ {})
12 changes: 12 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

{
:paths ["src" "polyfill"]
:aliases {
:release {
:extra-deps {
applied-science/deps-library {:mvn/version "0.4.0"}
}
:main-opts ["-m" "applied-science.deps-library"]
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"repository": "git@github.com:Cirru/sepal.clj.git",
"author": "jiyinyiyong <jiyinyiyong@gmail.com>",
"license": "MIT",
"scripts":{
"scripts": {
"watch": "shadow-cljs watch test",
"compile": "shadow-cljs compile test",
"test": "yarn compile && node target/test.js"
},
"devDependencies": {
"shadow-cljs": "^2.4.33"
"shadow-cljs": "^2.10.17"
}
}
7 changes: 7 additions & 0 deletions release.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

{:version "0.2.8-a1"
:group-id "cirru"
:artifact-id "sepal"
:skip-tag true
:description "Generate Clojure code from syntax tree"
:scm-url "https://github.com/Cirru/sepal.clj"}
18 changes: 12 additions & 6 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{:source-paths ["src" "polyfill"]
:dependencies [[fipp "0.6.12"]]
:builds {:test {:target :node-script
:output-to "target/test.js"
:main cirru-sepal.tree-test/main!
:devtools {:after-load cirru-sepal.tree-test/reload!}}}}
{
:source-paths ["src" "polyfill"]
:dependencies [
[fipp "0.6.23"]
]
:builds {
:test {
:target :node-script, :output-to "target/test.js", :main cirru-sepal.tree-test/main!
:devtools {:after-load cirru-sepal.tree-test/reload!}
}
}
}
Loading

0 comments on commit 53f85dc

Please sign in to comment.