Skip to content

fix kubectl test

fix kubectl test #2968

Workflow file for this run

name: "Deploy to Production"
on:
push:
branches:
- main
jobs:
test:
name: Run all Verifications/Tests
runs-on: home-automation
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install deps
run: yarn
- name: Prepare
run: yarn nx run-many --target=prepare --parallel --all
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Run all tests
run: yarn run test/all
- name: Coverage
if: always()
run: yarn run test/coverage/all
env:
CODECOV_TOKEN: ${{ secrets.CODE_COV_TOKEN }}
deploy:
name: Test and Deploy Affected Apps
runs-on: home-automation
needs:
- test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install deps
run: yarn
- name: Prepare
run: yarn nx run-many --target=prepare --parallel --all
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Install jsonnet plugins
run: jb install
- name: Deploy affected apps
run: yarn nx affected --target=deploy --parallel --base=HEAD~ --head=HEAD --verbose --exclude=manual-deployment,pihole,guest-db,gaming-library-db
env:
CODECOV_TOKEN: ${{ secrets.CODE_COV_TOKEN }}
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
NODE_ENV: production
- name: Remove disk pressure taint
run: ./scripts/bin/remove-evicted-pods.sh || true