Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
eba8279
wip: integration tests
SteveLauC Nov 7, 2025
431af0a
Remove other CI pipelines
SteveLauC Nov 7, 2025
b7f7aa4
Correct commands to start Easysearch
SteveLauC Nov 7, 2025
7a9357a
Correct scripts
SteveLauC Nov 7, 2025
43856b9
Try setting the password directly
SteveLauC Nov 7, 2025
fafffba
Debug the reason why EASYSEARCH_INITIAL_ADMIN_PASSWORD is not set
SteveLauC Nov 7, 2025
5141c2f
Set env var for cd dir | ./initialize.sh
SteveLauC Nov 7, 2025
2619f8d
Format yaml file
SteveLauC Nov 7, 2025
ec507d4
Set EASYSEARCH_INITIAL_ADMIN_PASSWORD in a separate step
SteveLauC Nov 7, 2025
4ddd60a
use -s option to confirm installation
SteveLauC Nov 7, 2025
4af8e23
Set EASYSEARCH_INITIAL_ADMIN_PASSWORD in a separate step
SteveLauC Nov 7, 2025
d9dc10f
Wait for Easysearch to start
SteveLauC Nov 7, 2025
dbde402
Install loadgen and ensure it is in PATH
SteveLauC Nov 7, 2025
ec0b549
Install loadgen, 2nd try
SteveLauC Nov 7, 2025
822490c
update
SteveLauC Nov 11, 2025
48340d6
update
SteveLauC Nov 12, 2025
ec42f57
update
SteveLauC Nov 12, 2025
561e58a
Install pnpm
SteveLauC Nov 12, 2025
293716d
clone framework and vendor
SteveLauC Nov 12, 2025
7aed455
clone via https
SteveLauC Nov 12, 2025
e5f7572
update
SteveLauC Nov 12, 2025
df45ce3
update
SteveLauC Nov 12, 2025
e2fde13
update
SteveLauC Nov 12, 2025
67f466b
update
SteveLauC Nov 12, 2025
951ae6b
update
SteveLauC Nov 12, 2025
78ec513
update
SteveLauC Nov 12, 2025
910affa
Easysearch snapshot repository
SteveLauC Nov 12, 2025
6b2a317
typo: hit.total.value
SteveLauC Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 0 additions & 119 deletions .github/workflows/build-docs.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/commit-message-check.yml

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Integration test

env:
GO_VERSION: 1.23.4
NODEJS_VERSION: 20.18.2
PNPM_VERSION: 'latest'
ES_ADMIN_PASSWORD: 'F0r_test_ci'

on:
pull_request:

jobs:
integration_test:
runs-on: ubuntu-latest

steps:
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: coco

- name: Move coco to ~/go/src/infini.sh/coco
run: |
mkdir -p ~/go/src/infini.sh
mv ./coco ~/go/src/infini.sh/

- name: Set up nodejs toolchain
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODEJS_VERSION }}

- name: Install pnpm
run: npm install -g pnpm@${{ env.PNPM_VERSION }}

- name: Check nodejs toolchain
run: node -v && npm -v && pnpm -v

- name: Set up go toolchain
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: false
cache: true

- name: Clone framework and framework vendor
run: |
git clone https://github.com/infinilabs/framework.git ~/go/src/infini.sh/framework
git clone https://github.com/infinilabs/framework-vendor.git ~/go/src/infini.sh/vendor

- name: Build Coco Server
working-directory: /home/runner/go/src/infini.sh/coco
run: make build-all

# I have no idea why ./bin/initialize.sh does not accept this var when
# I set it via
#
# $ EASYSEARCH_INITIAL_ADMIN_PASSWORD=${{ env.ES_ADMIN_PASSWORD }} ./bin/initialize.sh
#
# So I have to set it here, in a separate step
- name: Set env var EASYSEARCH_INITIAL_ADMIN_PASSWORD
run: echo "EASYSEARCH_INITIAL_ADMIN_PASSWORD=${{ env.ES_ADMIN_PASSWORD }}" >> $GITHUB_ENV

- name: Set up Easysearch
run: |
mkdir ~/es_install_dir
curl -sSL http://get.infini.cloud | bash -s -- -p easysearch -d ~/es_install_dir
cd ~/es_install_dir && ./bin/initialize.sh -s
cd ~/es_install_dir && nohup ./bin/easysearch > easysearch.log 2>&1 &
while ! nc -z 127.0.0.1 9200; do
echo "Easysearch is not up. Will re-check in 5 seconds..."
sleep 5
done
curl -k -u admin:${{env.ES_ADMIN_PASSWORD}} https://127.0.0.1:9200

- name: Install Loadgen
run: |
mkdir ~/loadgen_install_dir
curl -sSL http://get.infini.cloud | bash -s -- -p loadgen -d ~/loadgen_install_dir
# Move to binary to /usr/bin so that it is in $PATH
sudo mv ~/loadgen_install_dir/loadgen-linux-* /usr/bin/loadgen
# Make sure it is executable, just in case.
chmod +x /usr/bin/loadgen
# Run it to verify it is installed
loadgen
# Clear the log directory created by Loadgen
rm -r log

# TODO: restore coco_* indices

- name: Start Coco Server
working-directory: /home/runner/go/src/infini.sh/coco
run: |
echo ${{ env.ES_ADMIN_PASSWORD }} | ./bin/coco service add --stdin ES_PASSWORD
nohup ./bin/coco > coco.log 2>&1 &
while ! nc -z 127.0.0.1 9000; do
echo "Coco Server is not up. Will re-check in 5 seconds..."
sleep 5
done
while ! nc -z 127.0.0.1 2900; do
echo "Coco Server is not up. Will re-check in 5 seconds..."
sleep 5
done

- name: Run tests
working-directory: /home/runner/go/src/infini.sh/coco/tests
run: loadgen -config loadgen.yml -run loadgen.dsl -debug
34 changes: 0 additions & 34 deletions .github/workflows/osv-scanner.yml

This file was deleted.

Loading
Loading