Integration Test (#17)

* Adds a quick npm test

* Update .gitignore

* Adds additional requirements
This commit is contained in:
James Ives 2019-08-26 11:36:17 -04:00 committed by GitHub
parent f7faf642c5
commit 7b4197087b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 0 deletions

19
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Integration Test
on:
push:
branches:
- master
jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: 'test/build'
BUILD_SCRIPT: npm run-script build

6
.gitignore vendored
View File

@ -1,2 +1,8 @@
# .DS_Store
.DS_Store
# Integration Tests
npm-debug.log*
yarn-debug.log*
yarn-error.log*
test/build

BIN
test/image.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

32
test/index.html Normal file
View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Integration Test</title>
<meta name="robots" content="noindex" />
<style>
html, body {
height: 100%;
width: 100%;
}
body {
background-color: #000;
color: #fff;
margin: 0;
}
.image {
height: 100%;
width: 100%;
background-image: url('./image.jpg');
background-size: cover;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<div class="image"></div>
</body>
</html>

11
test/package.json Normal file
View File

@ -0,0 +1,11 @@
{
"name": "github-pages-deploy-action-test",
"description": "Integration Test for the GitHub Pages Deploy Action",
"license": "MIT",
"version": "0.0.0",
"repository": "",
"scripts": {
"build": "mkdir build && cp image.jpg ./build/image.jpg && cp index.html ./build/index.html"
}
}