Skip to content

test

test #52

Workflow file for this run

# This GitHub action will run integration tests
# Integration tests live here (not unit tests)
# act --secret-file act.env --container-architecture linux/amd64 --workflows .github/workflows/test.yaml
name: test
on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
workflow_run:
workflows: [build]
types:
- completed
permissions:
contents: read
packages: read
jobs:
integration-vite:
name: integration-vite
runs-on: ubuntu-latest
steps:
- env:
EVENT_CONTEXT: ${{ toJSON(github.event) }}
run: |
echo $EVENT_CONTEXT
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- name: Install Vite
run: npm install -g create-vite
- name: Create Vite App
run: create-vite test-app --template react
- name: Install Arkavo
run: |
export VERSION=$(npm pkg get version | xargs echo)
cd test-app
echo "@arkavo-org:registry=https://npm.pkg.github.com" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
npm install @arkavo-org/client@$(echo "${VERSION}-${GITHUB_SHA::8}")
- name: Copy Application Code
run: cp -r tests/web-app/src/* test-app/src
- name: Start Vite App
run: cd test-app && npm run dev &