tests: create tests ui tests suite #60
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
name: '📢 and 📲' | |
on: | |
pull_request: | |
branches: ['main'] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
environment: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dyne/pnpm@main | |
with: | |
node-version: '20.11.1' | |
submodules: true | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- run: | | |
git clone --recursive https://github.com/forkbombeu/signroom | |
cd signroom/admin | |
mkdir pb_data | |
cp ../../tests/fixtures/test.db pb_data/data.db | |
rm pb_migrations/1685000000_seed_features.js | |
go build | |
./pb migrate | |
./pb serve & | |
- run: npx playwright install --with-deps | |
- run: pnpm test:integration | |
env: | |
PUBLIC_BACKEND_URL: http://localhost:8090 | |
USER_EMAIL: ${{ vars.USER_EMAIL }} | |
USER_PASSWORD: ${{ vars.USER_PASSWORD }} | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: test-results | |
path: test-results/ | |
retention-days: 10 | |
distribute: | |
runs-on: ubuntu-latest | |
needs: tests | |
environment: test | |
steps: | |
- uses: dyne/pnpm@main | |
with: | |
submodules: true | |
node-version: '20.11.1' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Decode Keystore File | |
uses: timheuer/base64-to-file@v1 | |
id: android_keystore | |
with: | |
fileName: android_keystore.keystore | |
encodedString: ${{ secrets.ANDROID_KEYSTORE_FILE }} | |
- name: Decode Service Account File | |
uses: timheuer/base64-to-file@v1 | |
id: service_account | |
with: | |
fileName: play-store-credentials.json | |
encodedString: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }} | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- uses: maierj/fastlane-action@v3.1.0 | |
env: | |
KEYSTORE_PATH: ${{ steps.android_keystore.outputs.filePath }} | |
SERVICE_ACCOUNT_PATH: ${{ steps.service_account.outputs.filePath }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }} | |
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} | |
PULL_REQUEST_NUMBER: ${{ github.event.number }} | |
PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} | |
PUBLIC_BACKEND_URL: ${{ vars.PUBLIC_BACKEND_URL }} | |
with: | |
lane: distribute |