diff --git a/.circleci/config.yml b/.circleci/config.yml index 2761835..1f7db68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,5 @@ version: 2 + jobs: test: working_directory: ~/repo @@ -11,19 +12,86 @@ jobs: - restore_cache: keys: - build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} - - run: npm install - - run: npm run test + - run: + name: Install dependencies + command: npm install + - run: + name: Test + command: npm test - save_cache: paths: - node_modules - ~/.m2 + - ~/.npm key: build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + build: + working_directory: ~/repo + docker: + - image: circleci/openjdk:11-jdk-stretch-node-browsers + steps: + - checkout + - restore_cache: + keys: + - build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + - run: + name: Install dependencies + command: npm install + - run: + name: Build SPA + command: npm run build + - save_cache: + paths: + - node_modules + - ~/.m2 + - ~/.npm + key: build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + - persist_to_workspace: + root: /home/circleci/repo/public + paths: + - "*" + deploy: + working_directory: ~/repo + docker: + - image: circleci/openjdk:11-jdk-stretch-node-browsers + steps: + - add_ssh_keys: + fingerprints: + - "85:2f:28:0f:b9:45:b8:f1:0f:c2:0a:1c:5e:4d:a2:06" + - checkout + - attach_workspace: + at: /home/circleci/repo/public + - restore_cache: + keys: + - build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + - run: + name: Install dependencies + command: npm install + - run: + name: Deploy to gh-pages branch + command: | + git config user.email "build@circleci.com" + git config user.name "ci-build" + npm run deploy + workflows: version: 2 - test: + test-build-deploy: jobs: - test: filters: branches: ignore: - gh-pages + - build: + filters: + branches: + ignore: + - gh-pages + requires: + - test + - deploy: + requires: + - build + filters: + branches: + only: master diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 22b4175..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "10" - - "8" -addons: - chrome: stable -cache: - directories: - - node_modules - - .shadow-cljs - - $HOME/.m2 diff --git a/README.md b/README.md index b2650e8..034dfb4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Airsonic Web Client [](https://travis-ci.org/heyarne/airsonic-ui) [](https://circleci.com/gh/heyarne/airsonic-ui) [](https://greenkeeper.io/) +# Airsonic Web Client [](https://circleci.com/gh/heyarne/airsonic-ui) [](https://greenkeeper.io/) This repository contains an alternative web frontend for [airsonic](https://github.com/airsonic/airsonic). The goal is to eventually be able to fully replace the current web interface. @@ -37,9 +37,11 @@ $ npm install $ npm run dev ``` +All other build tasks are defined in the `package.json` (more below). + ### Editor integration -Integrating shadow-cljs with your editor helps tremendously with development. After having run `npm run dev` as described above you can connect to the REPL and get features like in-editor code execution and code completion / documentation lookup. For further information see [this part of the shadow-cljs user guide](https://shadow-cljs.github.io/docs/UsersGuide.html#_editor_integration), which contains instructions for Emacs, Atom, VSCode and other editors. Make sure to open `localhost:8080` in the browser to execute ClojureScript code. +Integrating shadow-cljs with your editor helps tremendously with development. After having run `npm run dev` as described above you can connect to the REPL and get features like in-editor code execution and code completion / documentation lookup. For further information see [this part of the shadow-cljs user guide](https://shadow-cljs.github.io/docs/UsersGuide.html#_editor_integration). Recommended editors and plugins are Calva for VSCode and CIDER for Emacs (comes with Spacemacs). Make sure to open `localhost:8080` in the browser after starting the `dev:cljs` task to execute ClojureScript code in a live REPL. ### re-frame-10x @@ -66,10 +68,12 @@ $ npm test # build and optimize the code once for production $ npm run build -# runs npm run build and publishes everything via gh-pages +# publishes everything via gh-pages $ npm run deploy ``` +There is continuous deployment set up on [circleci](https://circleci.com/gh/heyarne/airsonic-ui) that builds and deploys to `gh-pages` after a commit to the `master` branch. + **Note:** If you have a continuous build running and run `npm run build` or `npm run deploy`, it will delete the compiled tests, causing the continuous tests to not run anymore. This can be fixed by running `npm test` again. All build artifacts land in `/public`. Don't change anything in there as changes will be overwritten. diff --git a/build-report.html b/build-report.html deleted file mode 100644 index a428496..0000000 --- a/build-report.html +++ /dev/null @@ -1,846 +0,0 @@ - -