Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #211

Closed
wants to merge 37 commits into from
Closed

Test #211

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8cb037b
Merge branch 'release/1.1.0'
matus-tomlein Feb 8, 2022
c74ba79
Bump min RN version supported to v0.65+ (close #153)
matus-tomlein Mar 4, 2022
a8d642f
Add generic type for SelfDescribing event data (closes #156)
henbrand Mar 9, 2022
f1bfeca
Add support for React Native for tvOS (close #154)
matus-tomlein Mar 25, 2022
c954983
Prepare for 1.2.0 release
matus-tomlein Mar 25, 2022
03b6e2c
Merge branch 'release/1.2.0'
matus-tomlein Mar 25, 2022
b245ed4
Fix import of non-published NSDictionary helpers from SnowplowTracker…
matus-tomlein Apr 11, 2022
64cb713
Prepare for 1.2.1 release
matus-tomlein Apr 11, 2022
b76c84c
Merge branch 'release/1.2.1'
matus-tomlein Apr 12, 2022
b753d09
Upgrade Snowplow mobile trackers to v4 (close #167)
matus-tomlein Sep 14, 2022
e10e750
Add anonymous tracking features (close #168)
matus-tomlein Sep 27, 2022
5ca90ba
Remove circular imports of demo app dendencies when running in demo a…
matus-tomlein Sep 27, 2022
4f6725f
Upgrade internal and demo app dependencies (close #172)
matus-tomlein Sep 28, 2022
9616059
Add interface to subscribe for events tracked in Web views (close #169)
matus-tomlein Sep 29, 2022
f64aa88
Enable setting custom path for POST requests (close #178)
matus-tomlein Oct 3, 2022
be55701
Add option to add custom headers (close #165)
matus-tomlein Oct 3, 2022
2e33df8
Prepare for 1.3.0 release
matus-tomlein Oct 3, 2022
20f6000
Merge branch 'release/1.3.0'
matus-tomlein Oct 6, 2022
bd5a963
Bump Snowplow native tracker dependency to 4.1 (#186)
matus-tomlein Feb 2, 2023
eff2f77
Add JavaScript tracker core to be used in Expo managed workflow when …
matus-tomlein Feb 4, 2023
3bc99e5
Update year in copyright headers to 2023 (#187)
matus-tomlein Feb 4, 2023
866cee9
Prepare for 1.4.0 release
matus-tomlein Feb 4, 2023
c151a65
Merge branch 'release/1.4.0'
matus-tomlein Feb 4, 2023
ae32285
Upgrade project structure and update native trackers to version 5 (cl…
matus-tomlein Sep 15, 2023
45d5eb3
Fix buffer option in emitter configuration on Android to set correct …
matus-tomlein Sep 19, 2023
8a1a6cd
Disable automatic screen view tracking in the iOS and Android tracker…
matus-tomlein Sep 19, 2023
76942f0
Prepare for 2.0.0 release
matus-tomlein Sep 29, 2023
b1274a6
Lock yarn version to 1.22.19
matus-tomlein Feb 7, 2024
575790a
Update cocoapods version
matus-tomlein Feb 9, 2024
7965e40
Fix SelfDescribing extension type (close #204)
igneel64 Feb 12, 2024
0e6e7de
Upgrade to mobile trackers version 6 and add screen engagement tracki…
matus-tomlein Feb 21, 2024
08bb308
Fix running deploy action only on new tags
matus-tomlein Feb 21, 2024
e23a146
Update JavaScript tracker core version to 3.21.0
matus-tomlein Feb 21, 2024
1c34b7f
Update copyright headers
matus-tomlein Feb 22, 2024
499404a
Prepare for 2.1.0 release
matus-tomlein Feb 21, 2024
6093939
Update link demo apps (#209)
gibbok-snowplow Mar 19, 2024
ae507b1
Use macos-12 for e2e actions
matus-tomlein Jul 3, 2024
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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
node_modules
# don't lint build output
dist
# don't lint DemoApp here
DemoApp
# don't lint example app here
example
76 changes: 0 additions & 76 deletions .eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pbxproj -text
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
28 changes: 28 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Setup
description: Setup Node.js and install dependencies

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

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
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 --cwd example --frozen-lockfile
yarn install --frozen-lockfile
shell: bash
225 changes: 136 additions & 89 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,108 +1,155 @@
name: build
name: Build

on:
push:
branches:
- master
tags:
- '*.*.*'
pull_request:

jobs:
test:
runs-on: ubuntu-20.04

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install node modules
run: npm ci

- name: Compile TypeScript
run: npm run compile
- name: Checkout
uses: actions/checkout@v4

- name: Lint
run: npm run lint
- name: Setup
uses: ./.github/actions/setup

- name: Tests
run: npm run test
- name: Lint files
run: yarn lint

build_android:
needs: ["test"]
runs-on: ubuntu-20.04
- name: Typecheck files
run: yarn typecheck

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

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Checkout
uses: actions/checkout@v4

- name: Build tracker dist files
run: |
npm ci
npm run build
- name: Setup
uses: ./.github/actions/setup

- name: Install node_modules in DemoApp
working-directory: DemoApp
run: |
yarn install --frozen-lockfile --network-timeout 100000
- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

- name: Lint DemoApp
working-directory: DemoApp
run: yarn lint
build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build DemoApp
working-directory: DemoApp/android
run: |
./gradlew assembleDebug
- name: Setup
uses: ./.github/actions/setup

build_ios:
needs: ["test"]
runs-on: macos-10.15
- name: Build package
run: yarn prepack

build-android:
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-

- name: Check turborepo cache for Android
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")

if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi

- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"

- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build example for Android
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"

build-ios:
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Build tracker dist files
run: |
npm ci
npm run build

- name: Install node_modules in DemoApp
working-directory: DemoApp
run: |
yarn install --frozen-lockfile --network-timeout 100000

- name: Install Pods
working-directory: DemoApp/ios
run: |
pod install

- name: Build DemoApp
working-directory: DemoApp/ios
run: |
xcodebuild \
-workspace DemoApp.xcworkspace \
-scheme DemoApp \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 12' \
-derivedDataPath ios/build -UseModernBuildSystem=YES \
clean build \
CODE_SIGNING_ALLOWED=NO
- name: Checkout
uses: actions/checkout@v4

- name: setup-cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.15.2

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

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-

- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")

if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi

- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-

- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
yarn example pods
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
Loading
Loading