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

Add Azure DevOps build pipeline #7096

Merged
merged 26 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
058df41
Add azure-pipelines.yml to make DevOps happy
ianschmitz Apr 3, 2019
1a8d59f
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 5, 2019
c4d4606
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 6, 2019
58d5eac
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 6, 2019
65f9435
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 16, 2019
409b9b5
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 18, 2019
b9848f2
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 23, 2019
a55dc7a
Merge remote-tracking branch 'upstream/master'
ianschmitz Apr 26, 2019
d93d16d
Initial Azure Pipelines CI
willsmythe Apr 2, 2019
c878843
Remove unncessary Yarn cache
willsmythe Apr 2, 2019
195267b
clean up comment; fix typo
willsmythe Apr 2, 2019
89c796e
Rename azure pipelines YAML files
willsmythe Apr 3, 2019
9d54940
Add VERDACCIO_PACKAGE override variable to avoid hard-coded URL in ta…
willsmythe Apr 9, 2019
53a0f2f
Fix EOL in verdaccio.yaml
willsmythe Apr 10, 2019
ea6d262
Fix random 'unexpected end of file' problem; reduce calls to registry…
willsmythe Apr 11, 2019
a20ab53
Only run Behavior tests on mac; only run Old Node tests on Linux
willsmythe Apr 11, 2019
7481a92
update configurations
willsmythe Apr 12, 2019
67673a7
Play with Lerna 3.0 publish args; enable verbose logging
willsmythe Apr 24, 2019
a3b6629
Remove --loglevel from lerna publish; used for debugging
willsmythe Apr 29, 2019
582ccf1
Merge pull request #2 from willsmythe/master
ianschmitz May 1, 2019
cb2dd99
Update e2e publish scripts
ianschmitz Apr 26, 2019
f2e485d
Cleanup DevOps (#3)
ianschmitz May 2, 2019
d7c761a
Simplify mjs test suite
ianschmitz May 26, 2019
9191433
Remove unneeded deps from mjs suite
ianschmitz May 26, 2019
3b1b29b
PR feedback
ianschmitz May 26, 2019
0f3ade2
Swap Travis for Azure DevOps badge
ianschmitz May 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify mjs test suite
  • Loading branch information
ianschmitz committed May 26, 2019
commit d7c761a92ed6cdabc2e6fbe8fc92a5ee206b13b1
4 changes: 2 additions & 2 deletions test/fixtures/mjs-support/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`can use mjs library in development 1`] = `"Pikachu"`;
exports[`can use mjs library in development 1`] = `"world"`;

exports[`can use mjs library in production 1`] = `"Pikachu"`;
exports[`can use mjs library in production 1`] = `"world"`;
14 changes: 6 additions & 8 deletions test/fixtures/mjs-support/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ test('can use mjs library in development', async () => {
try {
const page = await browser.newPage();
await page.goto(`http://localhost:${port}/`);
await page.waitForSelector('.Pokemon-Name-Data', { timeout: 0 });
await page.waitForSelector('.mjs-gql-result', { timeout: 0 });
const output = await page.evaluate(() => {
return Array.from(
document.getElementsByClassName('Pokemon-Name-Data')
).pop().innerHTML;
return Array.from(document.getElementsByClassName('mjs-gql-result')).pop()
.innerHTML;
});
expect(output).toMatchSnapshot();
} finally {
Expand All @@ -29,11 +28,10 @@ test('can use mjs library in production', async () => {
try {
const page = await browser.newPage();
await page.goto(`http://localhost:${port}/`);
await page.waitForSelector('.Pokemon-Name-Data', { timeout: 0 });
await page.waitForSelector('.mjs-gql-result', { timeout: 0 });
const output = await page.evaluate(() => {
return Array.from(
document.getElementsByClassName('Pokemon-Name-Data')
).pop().innerHTML;
return Array.from(document.getElementsByClassName('mjs-gql-result')).pop()
.innerHTML;
});
expect(output).toMatchSnapshot();
} finally {
Expand Down
77 changes: 25 additions & 52 deletions test/fixtures/mjs-support/src/App.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,35 @@
import React, { Component } from 'react';
import ApolloClient, { gql } from 'apollo-boost';
iansu marked this conversation as resolved.
Show resolved Hide resolved
import { ApolloProvider, Query } from 'react-apollo';
import {
graphql,
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
} from 'graphql';

const GET_PIKA = gql`
{
pokemon(name: "Pikachu") {
name
}
}
`;

const client = new ApolloClient({
uri: 'https://graphql-pokemon.now.sh/graphql',
const schema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'RootQueryType',
fields: {
hello: {
type: GraphQLString,
resolve() {
return 'world';
},
},
},
}),
});

class Pokemon extends Component {
render() {
const { name } = this.props.pokemon;
return (
<h1>
Pokemon name: <span className="Pokemon-Name-Data">{name}</span>
</h1>
);
}
}

class Data extends Component {
class App extends Component {
state = {};
componentDidCatch() {
this.setState({ hasError: true });
}
render() {
const { hasError } = this.state;
return hasError ? (
<div className="Pokemon-Name-Data">Error :(</div>
) : (
<Query query={GET_PIKA}>
{({ loading, error, data }) => {
if (loading) {
return <div>Loading...</div>;
}
if (error) {
return <div className="Pokemon-Name-Data">Error :(</div>;
}
return <Pokemon pokemon={data.pokemon} />;
}}
</Query>
);
componentDidMount() {
graphql(schema, '{ hello }').then(({ data }) => {
this.setState({ result: data.hello });
});
}
}

class App extends Component {
render() {
return (
<ApolloProvider client={client}>
<Data />
</ApolloProvider>
);
const { result } = this.state;
return result ? <div className="mjs-gql-result">{result}</div> : null;
}
}

Expand Down