Bump word-wrap from 1.2.3 to 1.2.4 in /cli #324
Workflow file for this run
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: PR | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Check for style & bugs | |
uses: ludeeus/action-shellcheck@1.1.0 | |
with: | |
ignore: wait-for | |
env: | |
SHELLCHECK_OPTS: -s bash -e SC2162 -e SC2153 | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 17 | |
- name: Check .env drift | |
run: | | |
result=$(cmp --silent .env kube/base/faros/config/.env; echo $?) | |
if [[ $result -ne 0 ]]; then | |
echo "####" | |
echo "# Drift detected on configuration" | |
echo "# Ensure that 'kube/base/faros/config/.env' is identical to '.env'" | |
echo "# Execute 'cp -f .env kube/base/faros/config/.env' to sync the files" | |
echo "####" | |
exit $result | |
else | |
echo "No drift detected" | |
fi | |
- name: Build (init) | |
run: npm ci --unsafe-perm | |
working-directory: init | |
- name: Build (cli) | |
run: npm ci --unsafe-perm | |
working-directory: cli | |
- name: Run unit tests | |
run: npm run test:unit -- --coverage | |
working-directory: init | |
# In order to optimize for speed, we use the latest init image. | |
- name: Start services | |
run: FAROS_EMAIL=integration.tests@faros.ai FAROS_INIT_IMAGE=farosai/faros-ce-init:latest docker compose up --quiet-pull -d | |
- name: Show logs | |
run: docker compose logs --tail all | |
- name: Show services | |
run: docker compose ps -a | |
- name: Wait for init to complete | |
run: | | |
CONTAINER_EXIT_CODE=$(docker wait faros-community-edition-faros-init-1) | |
echo "Faros init container exit code was ${CONTAINER_EXIT_CODE}" | |
[[ $CONTAINER_EXIT_CODE -eq 0 ]] | |
- name: Get Hasura Admin Secret | |
run: | | |
echo $(cat .env | grep "^HASURA_GRAPHQL_ADMIN_SECRET") >> "$GITHUB_ENV" | |
- name: Run integration tests (init) | |
run: npm run test:integration -- --coverage | |
working-directory: init | |
- name: Run integration tests (cli) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npm run test:integration -- --coverage | |
working-directory: cli | |
- name: Stop services | |
run: docker compose down |