0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Add minor improvements to CI config

This commit is contained in:
Andrey Antukh 2023-11-29 16:22:56 +01:00 committed by Andrés Moya
parent 2a9b99e086
commit efd0ad802c
6 changed files with 43 additions and 22 deletions

View file

@ -29,6 +29,7 @@ jobs:
- run: cd .clj-kondo && cat config.edn
- run: cat .cljfmt.edn
- run: clj-kondo --version
# - run:
# name: "fmt check [clj]"
@ -36,22 +37,38 @@ jobs:
# yarn run fmt:clj:check
- run:
name: "lint [clj]"
name: common lint
working_directory: "./common"
command: |
yarn install
yarn run lint:clj
- run:
name: "lint [scss]"
name: frontend lint
working_directory: "./frontend"
command: |
yarn install
yarn run lint:scss
yarn run lint:clj
- run:
name: "tests [common]"
working_directory: "./common"
name: backend lint
working_directory: "./backend"
command: |
yarn install
yarn run lint:clj
- run:
name: exporter lint
working_directory: "./exporter"
command: |
yarn install
yarn run lint:clj
- run:
name: "common tests"
working_directory: "./common"
command: |
yarn test
clojure -X:dev:test :patterns '["common-tests.*-test"]'
@ -61,7 +78,18 @@ jobs:
NODE_OPTIONS: --max-old-space-size=4096
- run:
name: "tests [backend]"
name: "frontend tests"
working_directory: "./frontend"
command: |
yarn install
yarn test
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
NODE_OPTIONS: --max-old-space-size=4096
- run:
name: "backend tests"
working_directory: "./backend"
command: |
clojure -X:dev:test :patterns '["backend-tests.*-test"]'
@ -73,17 +101,6 @@ jobs:
PENPOT_TEST_REDIS_URI: "redis://localhost/1"
JVM_OPTS: -Xmx4g
- run:
name: "tests [frontend]"
working_directory: "./frontend"
command: |
yarn install
yarn test
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
NODE_OPTIONS: --max-old-space-size=4096
- save_cache:
paths:
- ~/.m2

View file

@ -25,9 +25,9 @@
:output
{:exclude-files
["data_readers.clj"
"frontend/src/app/util/perf.cljs"
"common/src/app/common/logging.cljc"
"common/src/app/common/exceptions.cljc"
"src/app/util/perf.cljs"
"src/app/common/logging.cljc"
"src/app/common/exceptions.cljc"
"^(?:backend|frontend|exporter|common)/build.clj"
"^(?:backend|frontend|exporter|common)/deps.edn"
"^(?:backend|frontend|exporter|common)/scripts/"

View file

@ -20,6 +20,7 @@
},
"scripts": {
"fmt:clj:check": "cljfmt check --parallel=false src/ test/",
"fmt:clj": "cljfmt fix --parallel=true src/ test/"
"fmt:clj": "cljfmt fix --parallel=true src/ test/",
"lint:clj": "clj-kondo --parallel --lint src/"
}
}

View file

@ -22,6 +22,7 @@
"scripts": {
"fmt:clj:check": "cljfmt check --parallel=false src/ test/",
"fmt:clj": "cljfmt fix --parallel=true src/ test/",
"lint:clj": "clj-kondo --parallel --lint src/",
"test:watch": "clojure -M:dev:shadow-cljs watch test",
"test:compile": "clojure -M:dev:shadow-cljs compile test --config-merge '{:autorun false}'",
"test:run": "node target/test.js",

View file

@ -27,6 +27,7 @@
},
"scripts": {
"fmt:clj:check": "cljfmt check --parallel=false src/",
"fmt:clj": "cljfmt fix --parallel=true src/"
"fmt:clj": "cljfmt fix --parallel=true src/",
"lint:clj": "clj-kondo --parallel --lint src/"
}
}

View file

@ -20,7 +20,8 @@
"fmt:clj": "cljfmt fix --parallel=true src/ test/",
"test:compile": "clojure -M:dev:shadow-cljs compile test --config-merge '{:autorun false}'",
"lint:scss": "yarn run prettier -c resources/styles -c src/**/*.scss",
"lint:fix": "yarn run prettier -c resources/styles -c src/**/*.scss -w",
"lint:scss:fix": "yarn run prettier -c resources/styles -c src/**/*.scss -w",
"lint:clj": "clj-kondo --parallel --lint src/",
"test:run": "node target/tests.js",
"test:watch": "clojure -M:dev:shadow-cljs watch test",
"test": "yarn run test:compile && yarn run test:run",