Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
437a52d
chore: add GitHub Actions setup and CI workflow for Node.js project, …
lposen May 8, 2025
35f3f5d
chore: update pull request template to use placeholder text for scree…
lposen May 8, 2025
371b359
chore: refine pull request template by adding a space for clarity in …
lposen May 8, 2025
eed96e9
docs: add code coverage badge to README for improved visibility of te…
lposen May 8, 2025
43aff7d
chore: add CI workflow for library build, type checking, linting, and…
lposen May 8, 2025
5bc10b0
docs: update code coverage badge in README to reflect Code Climate in…
lposen May 8, 2025
40d5826
docs: update coverage badge in README to a more descriptive format
lposen May 8, 2025
bf073d1
docs: add license badge and Code Climate coverage badge to README for…
lposen May 8, 2025
fb9abda
ci: add coverage badge generation step in workflow and update README …
lposen May 8, 2025
5b128ad
ci: add output for coverage step in workflow to improve CI reporting
lposen May 8, 2025
b5e68f0
ci: reorder coverage badge generation step in workflow for improved c…
lposen May 8, 2025
e0b534a
ci: fix output redirection syntax in coverage badge generation step f…
lposen May 8, 2025
414f514
ci: integrate QLTY coverage reporting in workflow and remove Codecov …
lposen May 8, 2025
5344e7a
Merge branch 'main' into MOB-11390-add-git-action-to-run-tests-in-ci
lposen May 8, 2025
c4d8121
ci: update GitHub Actions checkout action to v4 and fix token syntax …
lposen May 8, 2025
e6b7099
Merge branch 'MOB-11390-add-git-action-to-run-tests-in-ci' of https:/…
lposen May 8, 2025
b221973
ci: update GitHub Actions to use checkout and setup-node actions at v…
lposen May 8, 2025
56bf046
ci: add permissions to GitHub Actions workflows for improved function…
lposen May 8, 2025
3e71ad0
docs: update README and pull request template formatting, as per qlty
lposen May 8, 2025
830e1b8
fix: add missing newlines at the end of action.yml and google-service…
lposen May 8, 2025
db2f438
docs: update README to replace Code Climate badge with QLTY badges fo…
lposen May 8, 2025
2cbc410
ci: rename workflows for clarity and remove coverage badge workflow
lposen May 8, 2025
89a10a8
Merge branch 'MOB-11405-add-tests-for-withandroidpushnotifications' i…
lposen May 8, 2025
f94d42e
ci: add GitHub Actions workflow for automated build and commit process
lposen May 8, 2025
3d28a4b
ci: add linting and type-checking workflow to GitHub Actions
lposen May 8, 2025
c120de9
ci: force add build directory to ensure all files are committed in Gi…
lposen May 8, 2025
da95614
ci: update GitHub Actions workflow to push build results to the corre…
lposen May 8, 2025
6c39051
ci: enhance GitHub Actions workflow to handle commits based on event …
lposen May 8, 2025
dbf979c
chore: update build files [skip ci]
invalid-email-address May 8, 2025
e0b23cc
ci: refactor GitHub Actions workflow by commenting out existing steps…
lposen May 8, 2025
a50be99
ci: update GitHub Actions workflow to include build step and rename l…
lposen May 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Setup
description: Setup Node.js and install dependencies

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
7 changes: 3 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ Please explain the changes you made

Screenshots if the PR has visual changes.

| android | ios |
|--------|--------|
| <img width="453" alt="Screenshot 2025-03-27 at 9 11 22β€―PM" src="https://github.com/user-attachments/assets/dc0ba747-3588-4d9e-9731-68a2210954da" /> | <img width="453" alt="Screenshot 2025-03-27 at 9 11 22β€―PM" src="https://github.com/user-attachments/assets/54708c6b-192e-4028-85fd-dac1da00ae82" /> |
| <img width="453" alt="Screenshot 2025-03-27 at 9 11 22β€―PM" src="https://github.com/user-attachments/assets/1952a25a-5626-4eac-8909-261c0d407b71" /> | <img width="453" alt="Screenshot 2025-03-27 at 9 11 22β€―PM" src="https://github.com/user-attachments/assets/2ec49744-b09c-4484-a3e6-2b015b028db0" /> |
| android | ios |
| ------------------ | -------------- |
| ANDROID_SCREENSHOT | IOS_SCREENSHOT |

## 🧐 Testing

Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/build-and-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# name: Build and Commit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow is empty [actionlint:syntax-check]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow is empty [actionlint:syntax-check]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow is empty [actionlint:syntax-check]


# on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
# workflow_dispatch:

# permissions:
# contents: write # Required for committing changes

# jobs:
# build-and-commit:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0 # Fetch all history for proper versioning
# ref: ${{ github.event.pull_request.head.sha || github.sha }}

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# cache: 'yarn'

# - name: Install dependencies
# run: yarn install

# - name: Build package
# run: yarn prepare

# - name: Configure Git
# run: |
# git config --global user.name 'GitHub Actions'
# git config --global user.email 'github-actions@github.com'

# - name: Commit build results
# run: |
# git add build/ -f
# if git diff --quiet && git diff --staged --quiet; then
# echo "No changes to commit"
# exit 0
# fi

# if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# git commit -m "chore: update build files [skip ci]"
# git push origin HEAD:refs/heads/${{ github.head_ref }}
# else
# git commit -m "chore: update build files [skip ci]"
# git push origin HEAD:refs/heads/${{ github.ref_name }}
# fi
74 changes: 74 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build and Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested

permissions:
contents: read # Required for checking out code
checks: write # Required for updating check status
security-events: write # Required for security scanning

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
fail-on-severity: high

type-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Type check
run: yarn tsc --noEmit
build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Build package
run: yarn prepare
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Lint files
run: yarn lint

misspell:
name: runner / misspell
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: misspell
uses: reviewdog/action-misspell@9daa94af4357dddb6fd3775de806bc0a8e98d3e4 # v1.26.3
with:
github_token: ${{ secrets.github_token }}
locale: 'US'
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Unit Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested

permissions:
contents: read # Required for checking out code
checks: write # Required for updating check status

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Run unit tests with coverage
run: yarn test:coverage --maxWorkers=2

- name: Check coverage thresholds
run: |
COVERAGE_THRESHOLD=80
COVERAGE=$(cat coverage/coverage-summary.json | jq -r '.total.lines.pct')
if (( $(echo "$COVERAGE < $COVERAGE_THRESHOLD" | bc -l) )); then
echo "Coverage ($COVERAGE%) is below threshold ($COVERAGE_THRESHOLD%)"
exit 1
fi
echo "Coverage ($COVERAGE%) is above threshold ($COVERAGE_THRESHOLD%)"

- name: Upload coverage to QLTY
uses: qltysh/qlty-action/coverage@v1
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: coverage/lcov.info
- name: Add test coverage comment
id: coverageComment
uses: MishaKav/jest-coverage-comment@main
with:
hide-comment: false
coverage-summary-path: ./coverage/coverage-summary.json
Loading