Skip to content

Commit

Permalink
Testing devenv within GitHub actions. (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbushkov authored Jul 26, 2023
1 parent 4787f1a commit 44c0eb8
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,28 @@ env:
GCS_LATEST_PATH: _latest_server_deb
DOCKER_REPOSITORY: ghcr.io/google/grr
jobs:

test-devenv:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: check_deps
run: |
sudo apt-get update && sudo apt-get install -y podman curl jq
sudo usermod --add-subuids 500000-565535 --add-subgids 500000-565535 "${USER}"
devenv/devenv.sh check_deps
- name: start
run: |
devenv/devenv.sh start
OK=false
for attempt in $(seq 10); do
curl -su admin:admin http://localhost:4280/api/clients |
sed 1d |
jq -r ".items[].value.client_id.value" |
egrep -e "^C[.][0-9a-f]{16}\$" && { OK=true; break; }
echo "attempt ${attempt}: devenv not ready"
sleep 5
done
[[ $OK = true ]]
test-ubuntu:
runs-on: ubuntu-22.04
env:
Expand Down

0 comments on commit 44c0eb8

Please sign in to comment.