Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history


* 'main' of https://github.com/VSciFlight/open-bus-map-search: (94 commits)
  chore: lint css (hasadna#442)
  style: Ensure minimum width for ArrivalByTimeChart  (hasadna#433)
  fix: Remove unknown data (hasadna#438)
  chore: Revert "chore: add temporary route for the version release event (hasadna#382)" (hasadna#441)
  ci: upgrade linter (hasadna#439)
  fix: scrollbar color on dark mode (hasadna#431)
  fix: Fix for issue hasadna#428 unable to run project locally (hasadna#430)
  chore: Adding tnufa to dropdown in dashboard hasadna#423 (hasadna#429)
  chore(main): release 1.0.0 (hasadna#326)
  fix: make input labels visible at dark mode (hasadna#424)
  fix: make top input label visible at singleLine page (hasadna#420)
  chore: add i18n type safety (hasadna#419)
  feat: add home-page files and temp route (hasadna#403)
  feat: finish bug report form creation (hasadna#411)
  feat: Translation of the remaining untranslated text on the About page (hasadna#399)
  test: add SinglelinePage tests (hasadna#393)
  feat: made logo white on dark mode (hasadna#397)
  feat: date picker component show invalid dates warning (hasadna#398)
  chore: hide bug report form (hasadna#388)
  docs: fixed a dead link in README.md (hasadna#396)
  ...
  • Loading branch information
VSciFlight committed Jan 30, 2024
2 parents e83a951 + 1758bf5 commit 33016cf
Show file tree
Hide file tree
Showing 118 changed files with 8,099 additions and 10,699 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Code coverage
on:
push:
branches: [main]
pull_request:
branches: [main]

env:
USE_BABEL_PLUGIN_ISTANBUL: 1

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run install
run: npm ci
- run: npx playwright install
- name: Run test
run: npm run test
- name: Run end-to-end tests
run: npm test
- run: npx nyc report --reporter=lcovonly
- name: Upload to Coveralls
if: always()
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Lint PR'

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102 changes: 102 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Preview
on:
pull_request:

env:
ASSET_URL: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}
should_run: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
jobs:
should_run:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.set_should_run.outputs.should_run }}
steps:
- name: Set should_run
id: set_should_run
if: env.should_run
run: echo "::set-output name=should_run::true"

build:
runs-on: ubuntu-latest
needs: [should_run]
if: ${{ needs.should_run.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Run install
run: npm ci
- name: Build
run: npm run build
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
build-storybook:
runs-on: ubuntu-latest
needs: [should_run]
if: ${{ needs.should_run.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Run install
run: npm ci
- name: Build Storybook
run: npm run build-storybook -o dist/storybook
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
deploy-to-s3:
needs: [build, build-storybook]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- uses: shallwefootball/s3-upload-action@master
name: Upload trace to S3
if: always()
id: s3-trace
continue-on-error: true
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: noam-gaash.co.il
source_dir: dist
destination_dir: ${{ github.run_id }}/open-bus/${{ github.sha }}
- name: find comment
uses: peter-evans/find-comment@v1
if: github.event_name == 'pull_request'
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Preview'
- name: update comment
uses: peter-evans/create-or-update-comment@v1
if: steps.fc.outputs.comment-id
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body: |
Preview: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/index.html
Preview Storybook: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/storybook/index.html
- name: create comment
uses: peter-evans/create-or-update-comment@v1
if: steps.fc.outputs.comment-id == ''
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Preview: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/index.html
Preview Storybook: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/storybook/index.html
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: node
79 changes: 52 additions & 27 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,27 @@ jobs:
with:
node-version: 18
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: make sure package.lock does not exist
run: rm -f package-lock.json
run: npm ci
- name: make sure yarn.lock does not exist
run: rm -f yarn.json
- name: Git Check Clean Tree
uses: ArkadiK94/[email protected]
with:
error-reason: 'removing package-lock.json file'
- name: Install dependencies
run: yarn
run: npm i
- name: Git Check Clean Tree
uses: ArkadiK94/[email protected]
with:
error-reason: 'yarn'
error-reason: 'npm i'
- name: Build
run: yarn build
run: npm run build
- name: Build Storybook
run: yarn build-storybook -o dist/storybook
run: npm run build-storybook -o dist/storybook
- name: Git Check Clean Tree
uses: ArkadiK94/[email protected]
with:
error-reason: 'yarn build and yarn build-storybook'
error-reason: 'npm run build and npm run build-storybook'
lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -46,11 +44,9 @@ jobs:
with:
node-version: 18
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
run: npm ci
- name: Run lint
run: yarn lint
run: npm run lint
circular:
runs-on: ubuntu-latest
steps:
Expand All @@ -59,11 +55,9 @@ jobs:
with:
node-version: 18
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
run: npm ci
- name: find circular dependencies
run: yarn madge --extensions js,ts --circular .
run: npx madge --extensions js,ts --circular .
build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -99,18 +93,51 @@ jobs:
with:
node-version: 18
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- run: yarn playwright install
run: npm ci
- run: npx playwright install
- name: Run test
run: yarn test
run: npm run test
- name: upload playwright artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: playwright
path: test-results
- name: upload report
if: always()
uses: actions/upload-artifact@v2
with:
name: playwright
path: playwright-report
publish-test-results:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: playwright
path: test-results
- name: Publish test results
uses: shallwefootball/s3-upload-action@master
if: always()
id: s3-trace
continue-on-error: true
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: noam-gaash.co.il
source_dir: test-results
destination_dir: ${{ github.run_id }}/open-bus/${{ github.sha }}/test-results
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
description: 'Test results: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/test-results/index.html'
status: success
context: 'Test results'
targetUrl: 'https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/test-results/index.html'
test-unit:
timeout-minutes: 60
runs-on: ubuntu-latest
Expand All @@ -120,11 +147,9 @@ jobs:
with:
node-version: 20
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
run: npm ci
- name: run the tests
run: yarn test:unit
run: npm run test:unit
all-passed:
runs-on: ubuntu-latest
needs: [verify-clean-tree, lint, circular, test, test-unit]
Expand Down
15 changes: 3 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage
.nyc_output

# production
/dist
Expand All @@ -17,10 +16,9 @@
.env.development.local
.env.test.local
.env.production.local
.vscode

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
/test-results/
Expand All @@ -31,11 +29,4 @@ yarn-error.log*
**/traces
**/node_modules

# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
storybook-static
5 changes: 5 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tasks:
- init: npm install && npm run build
command: npm run start


Loading

0 comments on commit 33016cf

Please sign in to comment.