Skip to content

Commit

Permalink
feat(infrastructure): Upload compiled screenshot test assets to GCS (#…
Browse files Browse the repository at this point in the history
…2500)

New NPM command: `screenshot:upload-assets`.

First, run:

```bash
npm start
```

Then, in another terminal, run:

```bash
export MDC_GCLOUD_SERVICE_ACCOUNT_KEY_FILE_PATH=path/to/gcloud-service-account-key.json
npm run screenshot:upload-assets
```

To avoid collisions between developers, every batch of files is uploaded to a directory with the following format:

```
/<bucket>/<username>/<timestamp>/<commit>/assets/
```

E.g.: `/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/`.

Sample output:

* [`mdc-button/classes/baseline.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/classes/baseline.html)
* [`mdc-button/classes/dense.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/classes/dense.html)
* [`mdc-button/mixins/container-fill-color.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/container-fill-color.html)
* [`mdc-button/mixins/corner-radius.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/corner-radius.html)
* [`mdc-button/mixins/filled-accessible.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/filled-accessible.html)
* [`mdc-button/mixins/horizontal-padding-baseline.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/horizontal-padding-baseline.html)
* [`mdc-button/mixins/horizontal-padding-dense.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/horizontal-padding-dense.html)
* [`mdc-button/mixins/icon-color.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/icon-color.html)
* [`mdc-button/mixins/ink-color.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/ink-color.html)
* [`mdc-button/mixins/stroke-color.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/stroke-color.html)
* [`mdc-button/mixins/stroke-width.html`](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/04/03/23_00_32_993/5ca514fe/assets/mdc-button/mixins/stroke-width.html)
  • Loading branch information
acdvorak committed Apr 4, 2018
1 parent 10a75f6 commit 5ada5b4
Show file tree
Hide file tree
Showing 6 changed files with 1,268 additions and 16 deletions.

0 comments on commit 5ada5b4

Please sign in to comment.