Skip to content

Commit

Permalink
Merge pull request #96 from e-picsa/ci/build-tests
Browse files Browse the repository at this point in the history
Ci/build tests
  • Loading branch information
chrismclarke authored Jan 27, 2023
2 parents 9fa279e + 16f482f commit feaa2d9
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 61 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,15 @@ jobs:
android_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
lfs: true
ref: '${{github.event.inputs.build_branch}}'
- name: Checkout LFS objects
run: git lfs checkout
- name: Cache node modules
uses: actions/cache@v2
- uses: actions/setup-node@v3
with:
path: ./.yarn/cache
# If cachebusting required (e.g. breaking yarn changes on update) change `v1` to another number
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '16'
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
- name: Populate google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Ensure build and tests pass

name: Build Test
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
# TODO - Ensure tests pass
# - run: yarn nx test
# Ensure can also build
- run: yarn nx build
17 changes: 6 additions & 11 deletions .github/workflows/web-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'Test - Preview')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
with:
node-version: 16.x
- name: Cache node modules
uses: actions/cache@v2
lfs: true
- uses: actions/setup-node@v3
with:
path: ./.yarn/cache
# If cachebusting required (e.g. breaking yarn changes on update) change `v1` to another number
key: ${{ runner.os }}-node-modules-yarn-v20221105-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v20221105-
- run: yarn install
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn nx run picsa-apps-extension-app:build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/web-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ jobs:
web_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
with:
node-version: 16.x
- name: Cache node modules
uses: actions/cache@v2
lfs: true
- uses: actions/setup-node@v3
with:
path: ./.yarn/cache
# If cachebusting required (e.g. breaking yarn changes on update) change `v1` to another number
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
- run: yarn install
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn nx run picsa-apps-extension-app:build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
4 changes: 2 additions & 2 deletions apps/picsa-apps/extension-app-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "io.picsa.extension"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 3015000
versionName "3.15.0"
versionCode 3015001
versionName "3.15.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
4 changes: 2 additions & 2 deletions apps/picsa-apps/extension-app/src/app/data/surveys/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fieldVisit } from './field-visit';
import { registration } from './registration';
import { test } from './test';
import { testForm } from './testForm';

const FORMS = [registration, fieldVisit, test];
const FORMS = [registration, fieldVisit, testForm];

export default FORMS;
19 changes: 0 additions & 19 deletions apps/picsa-apps/extension-app/src/app/data/surveys/test.ts

This file was deleted.

19 changes: 19 additions & 0 deletions apps/picsa-apps/extension-app/src/app/data/surveys/testForm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const testForm = {
_key: 'testForm',
name: 'Test Form',
groups: ['u3EP0KB66MDcD3Ibom0o'],
isActive: false,
surveyJson: {
pages: [
{
name: 'page1',
elements: [
{
type: 'text',
name: 'question1',
},
],
},
],
},
};
2 changes: 1 addition & 1 deletion apps/picsa-tools/resources-tool/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"preBuild": {
"executor": "nx:run-commands",
"inputs": ["apps/picsa-tools/resources-tool/src/assets/resources/**"],
"inputs": ["{projectRoot}/src/assets/resources/**"],
"outputs": ["{projectRoot}/src/assets/resources/contents.json"],
"options": {
"command": "yarn ts-node tools/workflows/populateResourceContents.ts"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "picsa-apps",
"version": "3.15.0",
"version": "3.15.1",
"license": "See LICENSE",
"scripts": {
"ng": "nx",
Expand Down

0 comments on commit feaa2d9

Please sign in to comment.