CI Router Studio #1464
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: CI Router Studio | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '30 7 * * *' | |
workflow_dispatch: | |
jobs: | |
ci-docker-managed: | |
name: CI Router Studio | |
runs-on: ubuntu-latest | |
env: | |
CI: "true" | |
APOLLO_KEY: ${{ secrets.APOLLO_KEY }} | |
APOLLO_GRAPH_REF: ${{ secrets.APOLLO_GRAPH_REF_ROUTER }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- | |
name: install rover | |
run: | | |
echo --------------------------------------------------------------- | |
echo rover - installing ... | |
echo --------------------------------------------------------------- | |
curl -sSL https://rover.apollo.dev/nix/latest | sh -s -- --elv2-license accept | |
echo "$HOME/.rover/bin" >> ${GITHUB_PATH} | |
- | |
name: update docker-compose | |
run: | | |
which docker-compose && exit 0 || true | |
echo --------------------------------------------------------------- | |
echo docker-compose - installing ... | |
echo --------------------------------------------------------------- | |
BIN_DIR=$HOME/.docker-compose/bin | |
FILE=$BIN_DIR/docker-compose | |
mkdir -p $BIN_DIR | |
set -x | |
curl -L --fail https://github.com/docker/compose/releases/download/v2.11.1/docker-compose-`uname -s`-`uname -m` -o $FILE | |
chmod +x $FILE | |
echo "downloaded $($FILE --version)" | |
echo "$BIN_DIR" >> ${GITHUB_PATH} | |
set +x | |
echo --------------------------------------------------------------- | |
- name: check tools | |
run: | | |
make deps-check || true | |
- name: unpublish-subgraphs | |
run: | | |
make unpublish-subgraphs || true | |
- name: publish-subgraphs | |
run: | | |
make publish-subgraphs-docker-compose | |
- name: docker-compose build | |
run: | | |
set -x | |
docker-compose \ | |
-f docker-compose.yaml \ | |
-f opentelemetry/docker-compose.otel.yaml \ | |
-f misc/studio/docker-compose.router-no-code.yaml \ | |
build --parallel --progress plain | |
- name: docker-compose up -d | |
run: | | |
set -x | |
docker-compose \ | |
-f docker-compose.yaml \ | |
-f opentelemetry/docker-compose.otel.yaml \ | |
-f misc/studio/docker-compose.router-no-code.yaml \ | |
up -d | |
sleep 8 | |
docker-compose \ | |
-f docker-compose.yaml \ | |
-f opentelemetry/docker-compose.otel.yaml \ | |
-f misc/studio/docker-compose.router-no-code.yaml \ | |
logs | |
- name: smoke test | |
run: .scripts/smoke.sh 4000 250 | |
- name: docker-compose down | |
run: docker-compose down --remove-orphans |