Travis => Actions #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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_phantomjs.sh | |
- run: lein do clean, compile :all, test :all, doo phantom test once |