From 478f86e3fa2190207e6699c74f7e15d3af3fd389 Mon Sep 17 00:00:00 2001 From: Tim Lucas Date: Fri, 24 Apr 2020 15:33:10 +1000 Subject: [PATCH 1/3] Create build.yml --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b95ac81 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build & Test + +on: [push, pull_request] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: docker build . --tag buildkite/puppeteer:latest + - name: Test + run: | + cd example + docker-compose -f docker-compose.integration-tests.yml build tests + docker-compose -f docker-compose.integration-tests.yml run tests + ls screenshots/app.png From e7ba0bbfd12ed8c1d5e8e8d5ed4ce1406bd122c2 Mon Sep 17 00:00:00 2001 From: Tim Lucas Date: Fri, 24 Apr 2020 15:36:52 +1000 Subject: [PATCH 2/3] Upload the screenshot --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b95ac81..5c6a786 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,3 +18,7 @@ jobs: docker-compose -f docker-compose.integration-tests.yml build tests docker-compose -f docker-compose.integration-tests.yml run tests ls screenshots/app.png + - uses: actions/upload-artifact@v1 + with: + name: test-screenshot.png + path: screenshots/app.png From b3e3f2116fc7b982d795492652f1c41222977154 Mon Sep 17 00:00:00 2001 From: Tim Lucas Date: Fri, 24 Apr 2020 15:39:34 +1000 Subject: [PATCH 3/3] Fix screenshot upload --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c6a786..df818d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,4 +21,4 @@ jobs: - uses: actions/upload-artifact@v1 with: name: test-screenshot.png - path: screenshots/app.png + path: example/screenshots/app.png