-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2632 from LiteFarmOrg/integration
V3.3.0
- Loading branch information
Showing
1,197 changed files
with
126,488 additions
and
57,314 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
**Description** | ||
|
||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. | ||
|
||
Jira link: | ||
|
||
**Type of change** | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] This change requires a documentation update | ||
|
||
**How Has This Been Tested?** | ||
|
||
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration | ||
|
||
- [ ] Passes test case | ||
- [ ] UI components visually reviewed on desktop view | ||
- [ ] UI components visually reviewed on mobile view | ||
- [ ] Other (please explain) | ||
|
||
**Checklist:** | ||
|
||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] My changes generate no new warnings | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] New and existing unit tests pass locally with my changes | ||
- [ ] The precommit and linting ran successfully | ||
- [ ] I have added or updated language tags for text that's part of the UI | ||
- [ ] I have added "MISSING" for all new language tags to languages I don't speak | ||
- [ ] I have added [the GNU General Public License](https://lite-farm.atlassian.net/l/cp/BT0Dd7WW) to all new files |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: 'Beta-Export-Server-Deploy' | ||
on: | ||
push: | ||
branches: | ||
- integration | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy on beta export server | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Deploy beta export server over SSH | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.BETA_EXPORT_SERVER_HOST }} | ||
username: ${{ secrets.BETA_EXPORT_SERVER_USER }} | ||
key: ${{ secrets.BETA_EXPORT_SERVER_KEY }} | ||
script: ${{ secrets.BETA_EXPORT_SERVER_SCRIPT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: Run cypress happy path test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- integration | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 30 | ||
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 | ||
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 }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Run API in background | ||
working-directory: packages/api | ||
run: | | ||
npm ci && cd ../shared && npm ci | ||
cd ../api && npm run migrate:dev:db | ||
npm run start & | ||
env: | ||
PORT: 5000 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Run and test app | ||
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/[email protected] | ||
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 | ||
headed: true | ||
browser: chrome | ||
record: true | ||
parallel: true | ||
group: 'UI - Chrome' | ||
spec: cypress/e2e/happyPath.spec.js | ||
|
||
- 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 | ||
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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Deploy' | ||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: | ||
- integration | ||
|
||
concurrency: beta-deploy | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Deploy over SSH | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.BETA_SSH_HOST }} | ||
username: ${{ secrets.BETA_SSH_USER }} | ||
passphrase: ${{ secrets.BETA_SSH_PASS }} | ||
key: ${{ secrets.BETA_SSH_KEY }} | ||
command_timeout: 20m | ||
script: ${{ secrets.DEPLOYMENT_SCRIPT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: 'Roll out' | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- integration | ||
jobs: | ||
rollout: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Docker deploy | ||
uses: TapTap21/[email protected] | ||
with: | ||
remote_docker_host: [email protected] | ||
ssh_private_key: ${{ secrets.PRIVATE_KEY }} | ||
ssh_public_key: ${{ secrets.PUBLIC_KEY }} | ||
stack_file_name: docker-compose.beta.yml | ||
args: up --build -d |
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
Oops, something went wrong.