Skip to content

Commit b32578b

Browse files
authored
1 parent bf2f698 commit b32578b

File tree

3 files changed

+81
-44
lines changed

3 files changed

+81
-44
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
LOG_DIR: ${{github.workspace}}/log
13+
BIN_DIR: ${{github.workspace}}/bin
14+
COMPOSE_LOG: ${{github.workspace}}/log/docker-compose.log
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 5
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Cache project dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-clojure-${{ hashFiles('**/project.clj') }}
28+
restore-keys: |
29+
${{ runner.os }}-clojure
30+
- name: Prepare java
31+
uses: actions/setup-java@v4
32+
with:
33+
distribution: 'temurin'
34+
java-version: 21
35+
# ES5 needs this
36+
- run: sudo sysctl -w vm.max_map_count=262144
37+
# create log & bin dir if missing
38+
- run: mkdir -p $LOG_DIR
39+
- run: mkdir -p $BIN_DIR
40+
- run: docker compose -f containers/dev/docker-compose.yml up -d > $COMPOSE_LOG
41+
# Wait ES 5
42+
- run: until curl http://127.0.0.1:9205/; do sleep 1; done
43+
- name: Install clojure tools
44+
uses: DeLaGuardo/[email protected]
45+
with:
46+
lein: latest
47+
- run: sudo sh ./script/install-phantom-js-ubuntu.sh
48+
- run: lein do clean, compile :all, test :all, doo phantom test once

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
# This script install PhantomJS in your Debian/Ubuntu System
3+
#
4+
# This script must be run as root:
5+
# sudo sh install_phantomjs.sh
6+
#
7+
# https://gist.github.com/julionc/7476620
8+
9+
if [[ $EUID -ne 0 ]]; then
10+
echo "This script must be run as root" 1>&2
11+
exit 1
12+
fi
13+
14+
PHANTOM_VERSION="phantomjs-2.1.1"
15+
ARCH=$(uname -m)
16+
17+
if ! [ $ARCH = "x86_64" ]; then
18+
$ARCH="i686"
19+
fi
20+
21+
PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH"
22+
23+
sudo apt-get update
24+
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
25+
sudo apt-get install libfreetype6 libfreetype6-dev -y
26+
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
27+
28+
cd ~
29+
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
30+
sudo tar xvjf $PHANTOM_JS.tar.bz2
31+
32+
sudo mv $PHANTOM_JS /usr/local/share
33+
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin

0 commit comments

Comments
 (0)