From 46f550db4b17c2d1d5e59608d0e8eaedac986059 Mon Sep 17 00:00:00 2001 From: Alex Schimpf Date: Sat, 2 Mar 2024 20:54:08 -0800 Subject: [PATCH] workflow fixes --- .github/workflows/frontend-pull-request.yml | 6 ++++-- .github/workflows/sdk-javascript-pull-request.yml | 6 ++++-- admin/tests/api/run-tests.sh | 2 +- flags/tests/api/run-tests.sh | 10 +++++----- sdk/python/requirements-dev.txt | 1 + 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/frontend-pull-request.yml b/.github/workflows/frontend-pull-request.yml index d762c2e..79f7116 100644 --- a/.github/workflows/frontend-pull-request.yml +++ b/.github/workflows/frontend-pull-request.yml @@ -15,5 +15,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 'latest' - - run: npm --prefix frontend install . - - run: npm --prefix frontend run lint + - run: npm install . + working-directory: frontend + - run: npm run lint + working-directory: frontend diff --git a/.github/workflows/sdk-javascript-pull-request.yml b/.github/workflows/sdk-javascript-pull-request.yml index 3c48bbb..65c9aa8 100644 --- a/.github/workflows/sdk-javascript-pull-request.yml +++ b/.github/workflows/sdk-javascript-pull-request.yml @@ -15,5 +15,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 'latest' - - run: npm --prefix sdk/javascript install . - - run: npm --prefix sdk/javascript run lint + - run: npm install . + working-directory: sdk/javascript + - run: npm run lint + working-directory: sdk/javascript diff --git a/admin/tests/api/run-tests.sh b/admin/tests/api/run-tests.sh index 5325af9..29775ea 100755 --- a/admin/tests/api/run-tests.sh +++ b/admin/tests/api/run-tests.sh @@ -36,4 +36,4 @@ PYTHONPATH=./admin MYSQL_ECHO=0 python -m pytest --disable-warnings --cov=./app # Reset DBs docker exec -i mysql bash /docker-entrypoint-initdb.d/init.sh -redis-cli --cluster call --cluster-only-masters 127.0.0.1:7000 FLUSHALL +docker exec -i redis bash redis-cli --cluster call 127.0.0.1:7000 FLUSHALL diff --git a/flags/tests/api/run-tests.sh b/flags/tests/api/run-tests.sh index 0caca48..8374eaf 100755 --- a/flags/tests/api/run-tests.sh +++ b/flags/tests/api/run-tests.sh @@ -20,11 +20,11 @@ done sleep 5 # Add up some redis data -redis-cli -c --cluster call --cluster-only-masters 127.0.0.1:7000 FLUSHALL -redis-cli -c --cluster call --cluster-only-masters 127.0.0.1:7000 HSET "context-fields:{1}" "str" "1" -redis-cli -c --cluster call --cluster-only-masters 127.0.0.1:7000 HSET "feature-flags:{1}" "FLAG_1" '[[{"context_key": "str", "operator": 1, "value": "abc"}]]' -redis-cli -c --cluster call --cluster-only-masters 127.0.0.1:7000 SADD "private-keys:{1}" "gAAAAABlyKFJOkSChKo00njI-gPRHdR96V0xcykwHeim2qTJ_IYaQ00kyaDRIXv6r-Rzg2Yi1eXI5ZeCskrcq1WGow51djuyCEhEfcWLaD8amAtIW5EKTxj88Aa5f2yqlUlYryiM3lTJ-5qipYOM-6aWrzp9bC3iLFJ7svGpifl6AtpwnYZuod0=" +docker exec -i redis bash redis-cli -c --cluster call 127.0.0.1:7000 FLUSHALL +docker exec -i redis bash redis-cli -c --cluster call 127.0.0.1:7000 HSET "context-fields:{1}" "str" "1" +docker exec -i redis bash redis-cli -c --cluster call 127.0.0.1:7000 HSET "feature-flags:{1}" "FLAG_1" '[[{"context_key": "str", "operator": 1, "value": "abc"}]]' +docker exec -i redis bash redis-cli -c --cluster call 127.0.0.1:7000 SADD "private-keys:{1}" "gAAAAABlyKFJOkSChKo00njI-gPRHdR96V0xcykwHeim2qTJ_IYaQ00kyaDRIXv6r-Rzg2Yi1eXI5ZeCskrcq1WGow51djuyCEhEfcWLaD8amAtIW5EKTxj88Aa5f2yqlUlYryiM3lTJ-5qipYOM-6aWrzp9bC3iLFJ7svGpifl6AtpwnYZuod0=" PYTHONPATH=./flags MYSQL_ECHO=0 python -m pytest --disable-warnings --cov=./app --cov-fail-under=50 --no-cov-on-fail ./tests/api -redis-cli -c --cluster call --cluster-only-masters 127.0.0.1:7000 FLUSHALL +docker exec -i redis bash redis-cli -c --cluster call 127.0.0.1:7000 FLUSHALL diff --git a/sdk/python/requirements-dev.txt b/sdk/python/requirements-dev.txt index d3bde24..a9415df 100644 --- a/sdk/python/requirements-dev.txt +++ b/sdk/python/requirements-dev.txt @@ -1,6 +1,7 @@ build==1.* debugpy==1.* hatchling==1.* +mypy==1.* ruff==0.* types-requests==2.* twine==5.*