Skip to content

Commit

Permalink
Travis => Actions (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 authored Oct 23, 2024
1 parent bf2f698 commit b32578b
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 44 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
LOG_DIR: ${{github.workspace}}/log
BIN_DIR: ${{github.workspace}}/bin
COMPOSE_LOG: ${{github.workspace}}/log/docker-compose.log

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache project dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-clojure-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-clojure
- name: Prepare java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
# ES5 needs this
- run: sudo sysctl -w vm.max_map_count=262144
# create log & bin dir if missing
- run: mkdir -p $LOG_DIR
- run: mkdir -p $BIN_DIR
- run: docker compose -f containers/dev/docker-compose.yml up -d > $COMPOSE_LOG
# Wait ES 5
- run: until curl http://127.0.0.1:9205/; do sleep 1; done
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: latest
- run: sudo sh ./script/install-phantom-js-ubuntu.sh
- run: lein do clean, compile :all, test :all, doo phantom test once
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

33 changes: 33 additions & 0 deletions script/install-phantom-js-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# This script install PhantomJS in your Debian/Ubuntu System
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
#
# https://gist.github.com/julionc/7476620

if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi

PHANTOM_VERSION="phantomjs-2.1.1"
ARCH=$(uname -m)

if ! [ $ARCH = "x86_64" ]; then
$ARCH="i686"
fi

PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH"

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y

cd ~
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2

sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin

0 comments on commit b32578b

Please sign in to comment.