Skip to content

Commit

Permalink
Travis => Actions (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 authored Oct 23, 2024
1 parent 540b962 commit 5e9bcc1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 46 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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
strategy:
matrix:
docker-compose:
- 'containers/docker-compose.yml'
- 'containers/es7/docker-compose.yml'
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 ${{ matrix.docker-compose }} up -d --wait
- run: docker compose -f ${{ matrix.docker-compose }} logs -f > $COMPOSE_LOG &
- run: docker compose -f ${{ matrix.docker-compose }} ps

# Wait ES
- run: until curl http://127.0.0.1:9207/; do sleep 1; done
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: latest
- run: lein do clean, javac, test :all, with-profile test-encoding test
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion containers/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
es7:
image: elasticsearch:7.10.1
Expand Down
1 change: 0 additions & 1 deletion containers/es7/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
elasticsearch-dev:
image: elasticsearch:7.10.1
Expand Down

0 comments on commit 5e9bcc1

Please sign in to comment.