forked from r0adkll/sign-android-release
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Actions workflow to test without building (#20)
This should prevent the class of issue that happened after #16 was merged, which broke the Action externally.
- Loading branch information
1 parent
c6e3645
commit 65127d3
Showing
4 changed files
with
100 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Functional tests" | ||
description: "Run functional tests against the app in lib/index.js" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Load test key | ||
shell: bash | ||
id: get_key | ||
run: | | ||
value=$(cat src/tests/test_key_b64.txt) | ||
echo "text=$value" >> $GITHUB_OUTPUT | ||
- uses: ./ | ||
name: zipalign and Sign APK | ||
with: | ||
releaseDirectory: src/tests/apk-zip | ||
signingKeyBase64: ${{ steps.get_key.outputs.text }} | ||
alias: test_key | ||
keyStorePassword: android | ||
keyPassword: android | ||
zipAlign: true | ||
|
||
- uses: ./ | ||
name: Sign APK | ||
with: | ||
releaseDirectory: src/tests/apk | ||
signingKeyBase64: ${{ steps.get_key.outputs.text }} | ||
alias: test_key | ||
keyStorePassword: android | ||
keyPassword: android | ||
|
||
- uses: ./ | ||
name: Sign AAB | ||
with: | ||
releaseDirectory: src/tests/aab | ||
signingKeyBase64: ${{ steps.get_key.outputs.text }} | ||
alias: test_key | ||
keyStorePassword: android | ||
keyPassword: android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Build and test" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
name: Build and test | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: eslint | ||
run: npx eslint | ||
|
||
- name: Ensure no pending Git changes | ||
run: | | ||
GIT_STATUS=$(git status --porcelain) | ||
if [[ -n $GIT_STATUS ]]; then | ||
echo "There are pending Git changes after running the build. Did you forget to commit the .js files?" | ||
echo "$GIT_STATUS" | ||
exit 1 | ||
fi | ||
- name: Run unit tests | ||
run: npm run test | ||
|
||
- uses: "./.github/shared/functional-tests" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Test compiled action" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test action | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout | ||
|
||
- uses: "./.github/shared/functional-tests" |