forked from eXist-db/generator-exist
-
Notifications
You must be signed in to change notification settings - Fork 0
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 eXist-db#600 from duncdrum/feat-gha
Feat github action
- Loading branch information
Showing
14 changed files
with
306 additions
and
116 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# This workflow builds a xar archive, deploys it into exist and execute its test suites. | ||
# It also includes code for using semantic-release to upload packages as part of GitHub releases | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: exist-db CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
exist-version: [latest, release] | ||
java-version: [8] | ||
node-version: [12.x, 14.x] | ||
# TODO: see #563 could still be usefull for gulp builds | ||
# services: | ||
# # Label used to access the service container | ||
# exist: | ||
# image: existdb/existdb:${{ matrix.exist-version}} | ||
# ports: | ||
# - 8080:8080 | ||
|
||
steps: | ||
# Checkout code | ||
- uses: actions/checkout@v2 | ||
# set-up caches | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
# Build Frontend | ||
- name: Build Frontend Using Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
|
||
# Build Expath Package | ||
# TODO: #563 make optional for gulp builds | ||
- name: Build Expath Package | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
- run: ant | ||
|
||
# Deploy Package in Container | ||
- name: Pull Base Image | ||
run: docker pull existdb/existdb:${{ matrix.exist-version }} | ||
|
||
- name: Create CI Container | ||
run: docker create --name exist-ci -p 8080:8080 existdb/existdb:${{ matrix.exist-version }} | ||
|
||
- name: Prep CI Container | ||
run: docker cp ./build/*-dev.xar exist-ci:exist/autodeploy | ||
|
||
- name: Start Exist Container | ||
run: docker start exist-ci && sleep 30 | ||
|
||
# Testing | ||
- name: Run Unit Tests | ||
run: npm test | ||
<%_ if (apptype != 'library') { %> | ||
- name: Run Integration Tests | ||
run: npm run cypress | ||
<% } -%> | ||
# TODO: Add upload to dockerhub | ||
# release: | ||
# name: Release | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# if: github.ref == 'refs/heads/master' | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Setup Node.js | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: 14 | ||
# - name: Install dependencies | ||
# run: npm ci | ||
# - name: Create package | ||
# run: npm run build | ||
# - name: Release | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: npx semantic-release | ||
|
||
|
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,4 +1,5 @@ | ||
### Thank you for your Pull Request | ||
|
||
If you're adding a new feature, please adjust / add tests covering your code changes. You can reference any related issues below. | ||
|
||
Fixes # | ||
--- | ||
- [ ] includes changes to documentation / readme | ||
- [ ] did you already increase version number according to [sem-ver](http://semver.org)? |
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,14 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Your Ideal Solution | ||
|
||
### Any Alternative Options | ||
|
||
### Additional Context |
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
Oops, something went wrong.