Skip to content

fix: add environment setup step to integration tests workflow #33

fix: add environment setup step to integration tests workflow

fix: add environment setup step to integration tests workflow #33

name: integration-tests
on:
pull_request:
types: [opened, synchronize]
branches:
- main
push:
branches:
- main
jobs:
integration-test:
runs-on: ubuntu-latest
name: Integration Tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
- name: npm install
run: npm install
- name: Setup Integration Test Environment
env:
BOX_JWT_CONFIG: ${{ secrets.BOX_JWT_CONFIG }}
BOX_ADMIN_USER_ID: ${{ secrets.BOX_ADMIN_USER_ID }}
run: |
if [ -z "$BOX_JWT_CONFIG" ] || [ -z "$BOX_ADMIN_USER_ID" ]; then
echo "Missing required environment variables"
exit 1
fi
mkdir -p ~/.box
chmod 700 ~/.box
echo '{"cacheTokens":true,"boxReportsFolderPath":"/tmp/box-reports","boxDownloadsFolderPath":"/tmp/box-downloads"}' > ~/.box/settings.json
chmod 600 ~/.box/settings.json
- name: Run Integration Tests
env:
BOX_JWT_CONFIG: ${{ secrets.BOX_JWT_CONFIG }}
BOX_ADMIN_USER_ID: ${{ secrets.BOX_ADMIN_USER_ID }}
run: npm run test:integration