Skip to content

fix: Delete confusing assertion in test #73

fix: Delete confusing assertion in test

fix: Delete confusing assertion in test #73

Workflow file for this run

name: compat build
on:
- push
- pull_request
jobs:
check_compat:
name: Check ${{ matrix.versionTitle }}
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- versionTitle: ElasticSearch 7.17.0
dockerCommand: |
docker run -d --rm --name es -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.0
readyCondition: GREEN
- versionTitle: OpenSearch 1.3.12
dockerCommand: |
docker run -d --rm --name es -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9600 -e "discovery.type=single-node" -e DISABLE_SECURITY_PLUGIN="true" -e DISABLE_INSTALL_DEMO_CONFIG="true" opensearchproject/opensearch:1.3.12
readyCondition: Init AD version hash ring successfully
- versionTitle: OpenSearch 2.9.0
dockerCommand: |
docker run -d --rm --name es -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9600 -e "discovery.type=single-node" -e DISABLE_SECURITY_PLUGIN="true" -e DISABLE_INSTALL_DEMO_CONFIG="true" opensearchproject/opensearch:2.9.0
readyCondition: Init AD version hash ring successfully
fail-fast: false
steps:
- name: git checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
system-features = nixos-test benchmark big-parallel kvm
experimental-features = nix-command flakes
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Launch docker
run: |
${{ matrix.dockerCommand }}
until docker logs es | grep '${{ matrix.readyCondition }}'
do
sleep 1
done
- id: code-hash
name: Compute code directory hash
run: |
code_hash=$(git rev-parse HEAD:code | head -c 8)-$(git rev-parse HEAD:tests | head -c 8)-$(git rev-parse HEAD:bloodhound.cabal | head -c 8)
echo "code-hash=$code_hash" >> "$GITHUB_OUTPUT"
- name: Setup cache
id: cache-build
uses: actions/cache@v4
with:
path: ~/.cabal/store
key: compat-build-${{ steps.code-hash.outputs.code-hash}}
- name: Build with tests
run: nix develop --command bash -c 'cabal v2-build --enable-tests'
- name: Run tests
run: nix develop --command bash -c 'cabal test'
- name: Stop docker
if: always()
run: |
docker logs es
docker rm -f es