-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from line-o/fix/ci-setup
fix(ci): improve workflows
- Loading branch information
Showing
3 changed files
with
70 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Setup eXist-db" | ||
description: "Start an exist-db instance running in a docker container" | ||
inputs: | ||
docker-tag: | ||
description: "Tag of the existdb docker" | ||
required: true | ||
default: "release" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: setup | ||
run: | | ||
docker pull existdb/existdb:${{ inputs.docker-tag }} | ||
docker create --name exist-ci -p 8080:8080 -p 8443:8443 existdb/existdb:${{ inputs.docker-tag }} | ||
docker start exist-ci | ||
shell: bash | ||
# TODO this should rather be polling for a running container / a running service | ||
- id: wait-to-exist | ||
run: sleep 30 | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,35 @@ | ||
name: test node-exist | ||
name: Test Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
push: | ||
branches: | ||
- master | ||
|
||
workflow_dispatch: | ||
# Tests cannot run on windows due to issues with the windows server 2019 images | ||
# the github action runners are using not being able to run linux docker images | ||
# https://github.com/actions/virtual-environments/issues/1143 | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
node-version: [10.x, 12.x, 14.x] | ||
os: [ubuntu-latest] | ||
node-version: ['10', '12', '14'] | ||
docker-tag: [latest, release, 4.7.1] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: ./.github/actions/setup-existdb | ||
with: | ||
docker-tag: ${{ matrix.docker-tag }} | ||
|
||
- name: npm install and build | ||
- name: Install | ||
run: npm ci | ||
|
||
- name: Pull docker image | ||
run: docker pull existdb/existdb:${{ matrix.docker-tag }} | ||
|
||
- name: Build docker image | ||
run: docker create --name exist-ci -p 8080:8080 -p 8443:8443 existdb/existdb:${{ matrix.docker-tag }} | ||
|
||
- name: Start docker image | ||
run: docker start exist-ci | ||
|
||
- name: Wait for existdb startup | ||
run: sleep 20 | ||
|
||
- name: npm test | ||
run: npm test | ||
- name: Test | ||
run: npm test |