8000 Added support for cljs by lucywang000 · Pull Request #3 · aphyr/dom-top · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added support for cljs #3

New issue 8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: ci-test

on: [push, pull_request]

jobs:
clj-test:
# ubuntu 18.04 comes with lein + java8 installed
runs-on: ubuntu-18.04
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Install Java 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Run Tests
run:
lein kaocha

cljs-test:
runs-on: ubuntu-18.04
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Install Java 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Install Chrome
run: |
whoami
sudo apt-get update -qq
sudo apt-get install -q -y xvfb libgbm1 libxss1 chromium-browser

- name: Ensure chrome installed
run: chromium-browser --version

- name: Cache node deps
uses: actions/cache@v2
id: cache-node-deps
with:
path: ./node_modules
key: node-modules-${{ hashFiles('package.json') }}

- name: Install PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.16.1

- name: Fetch node deps
if: steps.cache-node-deps.outputs.cache-hit != 'true'
run: |
pnpm install --shamefully-hoist

- name: Run CLJS Tests
run: |
pnpm ci-build
pnpm ci-test
3 changes: 3 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{:paths ["src"]
:deps {riddley/riddley {:mvn/version "0.2.0"}
net.cgrand/macrovich {:mvn/version "0.2.1"}}}
29 changes: 29 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function (config) {
config.set({
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: [
'--no-sandbox',
]
}
},
// The directory where the output file lives
basePath: 'test-assets/karma/',
// The file itself
files: [
'ci.js',
],
frameworks: ['cljs-test'],
plugins: ['karma-cljs-test', 'karma-chrome-launcher'],
colors: true,
logLevel: config.LOG_INFO,
client: {
args: ["shadow.test.karma.init"],
singleRun: true
}
})
};
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "dom-top",
"version": "0.0.1",
"scripts": {
"ci-build": "shadow-cljs release :ci",
"ci-test": "karma start --single-run"
},
"devDependencies": {
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-cljs-test": "^0.1.0",
"puppeteer": "^13.4.1",
"shadow-cljs": "^2.19.3",
"source-map-support": "^0.5.19",
"ws": "^7.1.2"
}
}
Loading
0