Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LiteFarmOrg/LiteFarm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.6.4.1
Choose a base ref
...
head repository: LiteFarmOrg/LiteFarm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Aug 30, 2023

  1. Copy the full SHA
    046accc View commit details

Commits on Aug 31, 2023

  1. Copy the full SHA
    b9d8971 View commit details

Commits on Sep 1, 2023

  1. adapt to new structure

    mika-robots committed Sep 1, 2023
    Copy the full SHA
    0ad00f7 View commit details

Commits on Sep 12, 2023

  1. Move to Cypress 13

    mika-robots committed Sep 12, 2023
    Copy the full SHA
    fa9b507 View commit details
  2. Copy the full SHA
    0035b97 View commit details

Commits on Sep 14, 2023

  1. Copy the full SHA
    fcd3314 View commit details
  2. Update cypress_tests.yml

    Update github actions file
    mika-robots committed Sep 14, 2023
    Copy the full SHA
    ca907b5 View commit details
  3. Remove unused packages

    mika-robots committed Sep 14, 2023
    Copy the full SHA
    717cd49 View commit details
  4. Copy the full SHA
    2709830 View commit details
  5. Update project ID

    mika-robots committed Sep 14, 2023
    Copy the full SHA
    ae5889e View commit details

Commits on Sep 15, 2023

  1. Copy the full SHA
    8658387 View commit details
  2. Update code coverage path

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    a87aa06 View commit details
  3. Update the lock file

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    2c50e75 View commit details
  4. Fix working directory

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    279848e View commit details
  5. Copy the full SHA
    dc21154 View commit details
  6. Copy the full SHA
    6fda6f0 View commit details
  7. Move cypress to version 6

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    57e7415 View commit details
  8. Look for coverage file

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    3fc1b0d View commit details
  9. Copy the full SHA
    0031dfc View commit details
  10. Fix the find command

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    80f8721 View commit details
  11. Copy the full SHA
    eb00f02 View commit details
  12. Copy the full SHA
    90b93d7 View commit details
  13. Add the lock file

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    42e032f View commit details
  14. remove spanish test

    mika-robots committed Sep 15, 2023
    Copy the full SHA
    33e959b View commit details

Commits on Sep 16, 2023

  1. Copy the full SHA
    97c5fd4 View commit details

Commits on Sep 28, 2023

  1. Add basic crop test

    mika-robots committed Sep 28, 2023
    Copy the full SHA
    53e7411 View commit details

Commits on Oct 3, 2023

  1. Copy the full SHA
    49f1fa9 View commit details
  2. Copy the full SHA
    72dede9 View commit details

Commits on Oct 5, 2023

  1. Copy the full SHA
    9957088 View commit details

Commits on Oct 7, 2023

  1. Copy the full SHA
    1e195a7 View commit details

Commits on Oct 8, 2023

  1. Copy the full SHA
    4bb3e54 View commit details
  2. Increase timeout

    mika-robots committed Oct 8, 2023
    Copy the full SHA
    e812dd8 View commit details
  3. Copy the full SHA
    892a29d View commit details
  4. Copy the full SHA
    5eb8ab3 View commit details
  5. Copy the full SHA
    5f59630 View commit details
  6. Increase default timeout

    mika-robots committed Oct 8, 2023
    Copy the full SHA
    3cdef41 View commit details

Commits on Oct 9, 2023

  1. Copy the full SHA
    de97860 View commit details
  2. Copy the full SHA
    a506759 View commit details
  3. Copy the full SHA
    94049c1 View commit details
  4. Copy the full SHA
    82c8bde View commit details
  5. Add back opening tasks

    mika-robots committed Oct 9, 2023
    Copy the full SHA
    4a843a6 View commit details
  6. Copy the full SHA
    d321456 View commit details

Commits on Oct 10, 2023

  1. Copy the full SHA
    9c42d4b View commit details

Commits on Oct 11, 2023

  1. Copy the full SHA
    5b2d72f View commit details
  2. Cleanup commented code

    mika-robots committed Oct 11, 2023
    Copy the full SHA
    7b27e2f View commit details

Commits on Oct 12, 2023

  1. Fix certifier selection

    mika-robots committed Oct 12, 2023
    Copy the full SHA
    38165ee View commit details
  2. Remove parallel execution

    mika-robots committed Oct 12, 2023
    Copy the full SHA
    4856b05 View commit details
  3. Wait longer for concent

    mika-robots committed Oct 12, 2023
    Copy the full SHA
    4efb89b View commit details
  4. Copy the full SHA
    5b97466 View commit details
  5. Copy the full SHA
    4008650 View commit details
Showing 1,082 changed files with 102,390 additions and 30,422 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/automated_tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: "Automated Tests"
name: API Unit Tests

on:
pull_request:
branches:
- integration
- "patch/**"

jobs:
automated_tests:
api_unit_tests:
name: API Unit Tests
runs-on: ubuntu-20.04
container: node:16.15.0
container: node:18.16.1
services:
postgres:
image: postgres:13
75 changes: 75 additions & 0 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Crowdin Download Action

on:
workflow_dispatch:

jobs:
download-translations:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1 # Should be 1 to avoid parallel builds
matrix:
locales: [
# Frontend core i18n public translations
{
name: webapp_locales,
source: packages/webapp/public/locales/en/*.json,
translation: packages/webapp/public/locales/%two_letters_code%/%original_file_name%,
},
# Frontend compiled translations
{
name: webapp_compiled_locales,
source: packages/webapp/src/locales/en/*.json,
translation: packages/webapp/src/locales/%two_letters_code%/%original_file_name%,
},
# Consent Forms
{
name: webapp_consent,
source: packages/webapp/src/containers/Consent/locales/en/*.md,
translation: packages/webapp/src/containers/Consent/locales/%two_letters_code%/%original_file_name%,
},
# Shared translations
{
name: shared_locales,
source: packages/shared/locales/en/*.json,
translation: packages/shared/locales/%two_letters_code%/%original_file_name%,
},
# Backend tranlsations - skipping pdf (crop.json is copied jobs scheduler init during build)
{
name: api_job_locales,
source: packages/api/src/jobs/locales/en/*.json,
translation: packages/api/src/jobs/locales/%two_letters_code%/%original_file_name%,
},
# email templates
{
name: api_email_templates,
source: packages/api/src/templates/locales/en.json,
translation: packages/api/src/templates/locales/%two_letters_code%.%file_extension%,
},
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Synchronize with Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: true
skip_untranslated_strings: true
export_only_approved: true
source: ${{ matrix.locales.source }} # Sources pattern
translation: ${{ matrix.locales.translation }} # Translations pattern
localization_branch_name: l10n_crowdin_translations_${{ env.BRANCH_NAME }}_${{ matrix.locales.name }}
create_pull_request: true
pull_request_title: "New Crowdin translations ${{ matrix.locales.name }}"
pull_request_body: "New Crowdin pull request with translations of ${{ matrix.locales.name }}"
pull_request_base_branch_name: ${{ env.BRANCH_NAME }}
crowdin_branch_name: ${{ env.BRANCH_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.CROWDIN_TEMP_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
75 changes: 75 additions & 0 deletions .github/workflows/crowdin-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Crowdin Upload Action

on:
workflow_dispatch:
inputs:
upload_translations:
description: "Upload translations to Crowdin"
type: boolean
default: false
auto_approve_imported:
description: "Auto approve imported translations"
type: boolean
default: false

jobs:
synchronize-translations:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1 # Should be 1 to avoid parallel builds
matrix:
locales: [
# Frontend core i18n public translations
{
source: packages/webapp/public/locales/en/*.json,
translation: packages/webapp/public/locales/%two_letters_code%/%original_file_name%,
},
# Frontend compiled translations
{
source: packages/webapp/src/locales/en/*.json,
translation: packages/webapp/src/locales/%two_letters_code%/%original_file_name%,
},
# Consent Forms
{
source: packages/webapp/src/containers/Consent/locales/en/*.md,
translation: packages/webapp/src/containers/Consent/locales/%two_letters_code%/%original_file_name%,
},
# Shared translations
{
source: packages/shared/locales/en/*.json,
translation: packages/shared/locales/%two_letters_code%/%original_file_name%,
},
# Backend tranlsations - skipping pdf (crop.json is copied jobs scheduler init during build)
{
source: packages/api/src/jobs/locales/en/*.json,
translation: packages/api/src/jobs/locales/%two_letters_code%/%original_file_name%,
},
# email templates
{
source: packages/api/src/templates/locales/en.json,
translation: packages/api/src/templates/locales/%two_letters_code%.%file_extension%,
},
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Crowdin sync
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: ${{ github.event.inputs.upload_translations || false }}
upload_sources_args: --preserve-hierarchy
upload_translations_args: --preserve-hierarchy
download_translations: false
auto_approve_imported: ${{ github.event.inputs.auto_approve_imported || false }}
import_eq_suggestions: true
crowdin_branch_name: ${{ env.BRANCH_NAME }}
source: ${{ matrix.locales.source }} # Sources pattern
translation: ${{ matrix.locales.translation }} # Translations pattern
env:
GITHUB_TOKEN: ${{ secrets.CROWDIN_TEMP_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
118 changes: 59 additions & 59 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
@@ -2,42 +2,52 @@ name: Run cypress happy path test

on:
workflow_dispatch:
# pull_request:
# branches:
# - integration
pull_request:
types: [enqueued]
branches:
- integration
merge_group:

jobs:
build:
runs-on: ubuntu-20.04
cypress-tests:
name: Cypress E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres
env:
POSTGRES_DB: "pg-litefarm"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
# POSTGRES_HOST: localhost
# POSTGRES_HOST: postgres
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
volumes:
- ./initdb.d:/docker-entrypoint-initdb.d
- postgres-data:/var/lib/postgresql/data
strategy:
matrix:
node-version: [18.16.1]
env:
JWT_INVITE_SECRET: ${{secrets.JWT_INVITE_SECRET}}
JWT_RESET_SECRET: ${{secrets.JWT_RESET_SECRET}}
JWT_SCHEDULER_SECRET: ${{secrets.JWT_SCHEDULER_SECRET}}
JWT_SECRET: ${{secrets.JWT_SECRET}}
TEST_USER: ${{secrets.TEST_USER}}
TEST_USER_ID: ${{secrets.TEST_USER_ID}}
DEV_DATABASE_HOST: localhost
DEV_DATABASE: pg-litefarm
DEV_DATABASE_USER: postgres
DEV_DATABASE_PASSWORD: postgres
JWT_SECRET: This_will_(really)_work
JWT_INVITE_SECRET: Any_arbitrary_string_will_do
JWT_RESET_SECRET: Production_is_secured_with_a_long_random_string
JWT_FARM_SECRET: Here_we_can_use_friendly_explanations
JWT_SCHEDULER_SECRET: Another_token_was_needed_for_the_scheduler
GOOGLE_API_KEY: ${{secrets.VITE_GOOGLE_MAPS_API_KEY}}
VITE_GOOGLE_MAPS_API_KEY: ${{secrets.VITE_GOOGLE_MAPS_API_KEY}}
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
NODE_ENV: development

strategy:
matrix:
node-version: [16.15.0]

steps:
- uses: ikalnytskyi/action-setup-postgres@v3
with:
username: ${{env.DEV_DATABASE_USER}}
password: ${{env.DEV_DATABASE_PASSWORD}}
database: ${{env.DEV_DATABASE}}
port: 5432

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
@@ -53,53 +63,43 @@ jobs:
npm run start &
env:
PORT: 5000
DEV_DATABASE_HOST: localhost
DEV_DATABASE: pg-litefarm
DEV_DATABASE_USER: postgres
DEV_DATABASE_PASSWORD: postgres
NODE_ENV: development

- name: Install pnpm
uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v2
with:
version: latest

- name: Run and test app
- name: Run Webapp
working-directory: packages/webapp
run: |
pnpm install --config.auto-install-peers=true --no-frozen-lockfile --force
pnpm dev &
env:
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
VITE_ENV: development
VITE_GOOGLE_OAUTH_CLIENT_ID: ${{secrets.VITE_GOOGLE_OAUTH_CLIENT_ID}}
VITE_DO_BUCKET_NAME: litefarm
NODE_ENV: development
VITE_API_URL: http://localhost:5000
CYPRESS_RECORD_KEY: "2630f414-4914-48b0-907d-aa3a9cc6a30b"
uses: cypress-io/github-action@v4.2.0
CYPRESS_COVERAGE: true
- name: Run E2E test (English)
env:
CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_RECORD_KEY}}
CYPRESS_USER: 0
uses: cypress-io/github-action@v6
with:
working-directory: packages/webapp
install-command: pnpm install --config.auto-install-peers=true --no-frozen-lockfile --force
install: true
start: pnpm dev
wait-on: "http://localhost:3000"
wait-on-timeout: 120
working-directory: packages/end-to-end
headed: true
browser: chrome
record: true
parallel: true
parallel: false
group: "UI - Chrome"
spec: cypress/e2e/happyPath.spec.js
ci-build-id: ${{ github.run_id }}

- name: set code coverage badge
run: npx -p check-code-coverage update-badge --from '${GITHUB_WORKSPACE}/packages/webapp/coverage/coverage-summary.json'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Archive code coverage results
- name: Archive backend logs
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: code-coverage-report
working-directory: packages/webapp
path: coverage/coverage-summary.json

- name: Set code coverage commit status
continue-on-error: true
working-directory: packages/webapp
run: npx set-gh-status
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_SHA: ${{ github.event.after }}
name: logs
path: packages/api/logs
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Deploy'
name: "Deploy"
on:
workflow_dispatch:

@@ -26,8 +26,8 @@ jobs:
with:
script_stop: true
host: ${{ secrets.BETA_SSH_HOST }}
username: ${{ secrets.BETA_SSH_USER }}
passphrase: ${{ secrets.BETA_SSH_PASS }}
key: ${{ secrets.BETA_SSH_KEY }}
username: ${{ secrets.BETA_SSH_USER_NEW }}
passphrase: ${{ secrets.BETA_SSH_PASS_NEW }}
key: ${{ secrets.BETA_SSH_KEY_NEW }}
command_timeout: 20m
script: ${{ steps.script.outputs.content }}
2 changes: 1 addition & 1 deletion .github/workflows/lint_translation_files.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.26.1
version: latest

- name: Install pnpm dependencies
run: pnpm install
5 changes: 3 additions & 2 deletions .github/workflows/webapp_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Webapp Unit Tests"
name: Webapp Unit Tests

on:
pull_request:
@@ -7,6 +7,7 @@ on:

jobs:
webapp_unit_tests:
name: Webapp Unit Tests
runs-on: ubuntu-latest
defaults:
run:
@@ -17,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.26.1
version: latest
- name: Install dependencies
run: pnpm install
- name: Run unit tests
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,8 +6,9 @@ packages/api/.env.local
packages/api/tickets
packages/api/.env
packages/webapp/.env
packages/webapp/cypress/videos
packages/webapp/cypress/screenshots
packages/end-to-end/cypress/videos
packages/end-to-end/cypress/screenshots
packages/end-to-end/coverage
packages/webapp/.nyc_output
packages/webapp/.nyc_output/out.json
packages/webapp/cypress.env.json
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
node .husky/commit-msg.js $1
Loading