Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI from Travis to Github Actions #685

Merged
merged 23 commits into from Feb 11, 2021
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -0,0 +1,30 @@
name: Lint & Test

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
- develop

jobs:
lint-and-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '10'
- name: Install Dependencies
run: |
yarn install --frozen-lockfile
- name: Build Licenses
run: |
node ./tools/licenses/fetchLicenses.js
- name: Lint
run: |
yarn lint
- name: Test
run: |
yarn test

This file was deleted.

@@ -15,7 +15,7 @@ import React from 'react';
import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';
import { MemoryRouter } from 'react-router';
import Step1_LoginForm from '../Step1_LoginForm';
import Step1_LogInForm from '../Step1_LogInForm';

const noop = () => {};
describe('app/hub/Views/Step1_LoginForm component', () => {
@@ -33,7 +33,7 @@ describe('app/hub/Views/Step1_LoginForm component', () => {

const component = renderer.create(
<MemoryRouter>
<Step1_LoginForm {...initialState} />
<Step1_LogInForm {...initialState} />
</MemoryRouter>
).toJSON();
expect(component).toMatchSnapshot();
@@ -49,7 +49,7 @@ describe('app/hub/Views/Step1_LoginForm component', () => {
handleSubmit: jest.fn(),
}

const component = shallow(<Step1_LoginForm {...happyState} />);
const component = shallow(<Step1_LogInForm {...happyState} />);
expect(happyState.handleSubmit.mock.calls.length).toBe(0);
component.find('form').simulate('submit');
expect(happyState.handleSubmit.mock.calls.length).toBe(1);
@@ -65,7 +65,7 @@ describe('app/hub/Views/Step1_LoginForm component', () => {
handleSubmit: jest.fn(),
};

const component = shallow(<Step1_LoginForm {...sadState} />);
const component = shallow(<Step1_LogInForm {...sadState} />);

expect(sadState.handleSubmit.mock.calls.length).toBe(0);
component.find('form').simulate('submit');
@@ -16,6 +16,7 @@ import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';
import { MemoryRouter } from 'react-router';
import ChoosePlanView from '../ChoosePlanView';
import { SEARCH_GHOSTERY } from '../../Step3_ChooseDefaultSearchView/ChooseDefaultSearchConstants';

const noop = () => {};

@@ -25,7 +26,8 @@ describe('app/dawn-hub/Views/OnboardingViews/Step4_ChoosePlanView/ChoosePlanView
selectedGhosteryGlow: true,
actions: {
setSetupStep: noop
}
},
defaultSearch: SEARCH_GHOSTERY,
};
describe('Snapshot tests with react-test-renderer', () => {
test('ChoosePlanView is rendered correctly', () => {
ProTip! Use n and p to navigate between commits in a pull request.