forked from arkavo-com/opentdf-client-web
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.49 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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 &