Skip to content

Commit 0a3887d

Browse files
authored
Merge pull request #302 from opentripplanner/dev
Merge TravisCI replacement with GitHub Actions to master
2 parents 3bdc600 + 2672afa commit 0a3887d

File tree

10 files changed

+72
-36
lines changed

10 files changed

+72
-36
lines changed

Diff for: .github/workflows/codespell.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# GitHub Action to automate the identification of common misspellings in text files.
2+
# https://github.com/codespell-project/actions-codespell
3+
# https://github.com/codespell-project/codespell
4+
name: codespell
5+
on: pull_request
6+
jobs:
7+
codespell:
8+
name: Check for spelling errors
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: codespell-project/actions-codespell@master
13+
with:
14+
check_filenames: true
15+
skip: ./.git,yarn.lock

Diff for: .github/workflows/node-ci.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test-build-release:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js 12.x
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12.x
20+
- name: Install npm packages using cache
21+
uses: bahmutov/npm-install@v1
22+
- name: Copy example config
23+
run: cp example-config.yml config.yml
24+
- name: Lint code
25+
run: yarn lint
26+
- name: Lint docs
27+
run: yarn lint-docs
28+
- name: Run tests with coverage
29+
run: yarn cover
30+
- name: Build example project
31+
run: yarn build
32+
33+
# at this point, the build is successful
34+
- name: Codecov
35+
uses: codecov/[email protected]
36+
continue-on-error: true
37+
- name: Semantic Release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: yarn semantic-release

Diff for: .travis.yml

-25
This file was deleted.

Diff for: example-config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,7 @@ itinerary:
196196
# phoneFormatOptions:
197197
# # ISO 2-letter country code for phone number formats (defaults to 'US')
198198
# countryCode: US
199+
200+
# Format the date time format for display.
201+
dateTime:
202+
longDateFormat: DD-MM-YYYY

Diff for: lib/actions/api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export function carRentalQuery (params) {
350350
return createQueryAction('car_rental', carRentalResponse, carRentalError)
351351
}
352352

353-
// Vehicle rental locations lookup query. For now, there are 3 seperate
353+
// Vehicle rental locations lookup query. For now, there are 3 separate
354354
// "vehicle" rental endpoints - 1 for cars, 1 for bicycle rentals and another
355355
// for micromobility. In the future, the hope is to consolidate these 3
356356
// endpoints into one.

Diff for: lib/actions/user.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function fetchAuth0Token (auth0) {
6262

6363
dispatch(setCurrentUser({ accessToken }))
6464
} catch (error) {
65-
// TODO: improve UI if there is an errror.
65+
// TODO: improve UI if there is an error.
6666
alert('Error obtaining an authorization token.')
6767
}
6868
}
@@ -257,7 +257,7 @@ export function requestPhoneVerificationSms (newPhoneNumber) {
257257
const now = new Date()
258258

259259
// Request a new verification code if we are requesting a different number.
260-
// or enough time has ellapsed since the last request (1 minute?).
260+
// or enough time has elapsed since the last request (1 minute?).
261261
// TODO: Should throttling be handled in the middleware?
262262
if (number !== newPhoneNumber || (now - timestamp) >= 60000) {
263263
const { accessToken, apiBaseUrl, apiKey, loggedInUser } = getMiddlewareVariables(state)

Diff for: lib/components/user/notification-prefs-pane.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const allowedNotificationChannels = [
3434
]
3535

3636
// Styles
37-
// HACK: Preverve container height.
37+
// HACK: Preserve container height.
3838
const Details = styled.div`
3939
min-height: 150px;
4040
margin-bottom: 15px;
@@ -132,7 +132,7 @@ const NotificationPrefsPane = ({
132132
bsStyle={notificationChannel === type ? 'primary' : 'default'}
133133
key={index}
134134
// onBlur and onChange have to be set on individual controls instead of the control group
135-
// in order for Formik to correcly process the changes.
135+
// in order for Formik to correctly process the changes.
136136
onBlur={handleBlur}
137137
onChange={handleChange}
138138
value={type}

Diff for: lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export {
9090
TripDetails,
9191
TripTools,
9292

93-
// mobile compoments
93+
// mobile components
9494
MobileMain,
9595

9696
// viewer components

Diff for: lib/reducers/create-otp-reducer.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ const MAX_RECENT_STORAGE = 5
2727
* Validates the initial state of the store. This is intended to mainly catch
2828
* configuration issues since a manually edited config file is loaded into the
2929
* initial state.
30-
* TODO: mabye it's a better idea to move all of this to a script that can do
30+
* TODO: maybe it's a better idea to move all of this to a script that can do
3131
* JSON Schema validation and other stuff.
3232
*/
33-
function validateInitalState (initialState) {
33+
function validateInitialState (initialState) {
3434
const {config} = initialState
3535

3636
const errors = []
@@ -237,8 +237,8 @@ export function getInitialState (userDefinedConfig, initialQuery) {
237237

238238
function createOtpReducer (config, initialQuery) {
239239
const initialState = getInitialState(config, initialQuery)
240-
// validate the inital state
241-
validateInitalState(initialState)
240+
// validate the initial state
241+
validateInitialState(initialState)
242242

243243
return (state = initialState, action) => {
244244
const searchId = action.payload && action.payload.searchId
@@ -560,7 +560,7 @@ function createOtpReducer (config, initialQuery) {
560560
if (duplicateIndex !== -1) searches[duplicateIndex] = action.payload
561561
else searches.unshift(action.payload)
562562
const sortedSearches = searches.sort((a, b) => b.timestamp - a.timestamp)
563-
// Ensure recent searches do not extend beyong MAX_RECENT_STORAGE
563+
// Ensure recent searches do not extend beyond MAX_RECENT_STORAGE
564564
if (sortedSearches.length >= MAX_RECENT_STORAGE) {
565565
sortedSearches.splice(MAX_RECENT_STORAGE)
566566
}

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"prepublish": "mastarm prepublish --config configurations/prepublish",
1212
"prestart": "yarn",
1313
"test": "yarn run lint && yarn run lint-docs && yarn run jest",
14+
"semantic-release": "semantic-release",
1415
"start": "mastarm build -e development --serve example.js"
1516
},
1617
"standard": {

0 commit comments

Comments
 (0)