Skip to content

Commit

Permalink
Fixed prepare action
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 committed Sep 9, 2024
1 parent cff5efd commit 074602e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
12 changes: 9 additions & 3 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Prepare PowerAuth JS environment

inputs:
env-file:
description: Contents of the testapp/.env file
required: false
default: "empty"

runs:
using: composite
steps:
Expand All @@ -8,8 +14,8 @@ runs:
with:
node-version: 22
- name: Install dependencies
shell: bash
run: npm i
- name: Set .env file
env:
ENV_TEST_FILE: ${{ secrets.ENV_TEST_FILE }}
run: echo -e "$ENV_TEST_FILE" > testapp/.env
shell: bash
run: echo -e "${{ inputs.env-file }}" > testapp/.env
10 changes: 3 additions & 7 deletions .github/workflows/build-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm i
- name: run library build
- name: Prepare environment
uses: ./.github/actions/prepare
- name: Library build
run: npm run build
4 changes: 4 additions & 0 deletions .github/workflows/test-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: actions/checkout@v4
- name: Prepare environment
uses: ./.github/actions/prepare
with:
env-file: ${{ secrets.ENV_TEST_FILE }}
- name: Run Cordova iOS Tests
run: npm run buildAndRunCordovaIosTests
test-react-native:
Expand All @@ -26,5 +28,7 @@ jobs:
uses: actions/checkout@v4
- name: Prepare environment
uses: ./.github/actions/prepare
with:
env-file: ${{ secrets.ENV_TEST_FILE }}
- name: Run React-Native iOS Tests
run: npm run buildAndRunReactIosTests

0 comments on commit 074602e

Please sign in to comment.