This repository has been archived by the owner on Nov 14, 2021. It is now read-only.
-
-
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.
- Loading branch information
1 parent
157ebf6
commit 360cce9
Showing
2 changed files
with
111 additions
and
33 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 |
---|---|---|
|
@@ -3,13 +3,13 @@ name: CI | |
on: | ||
push: | ||
branches: | ||
- '**' | ||
- "**" | ||
tags-ignore: | ||
- '**' | ||
- "**" | ||
pull_request: | ||
paths-ignore: | ||
- '.gitignore' | ||
- '.dockerignore' | ||
- ".gitignore" | ||
- ".dockerignore" | ||
|
||
jobs: | ||
unit-test: | ||
|
@@ -23,8 +23,10 @@ jobs: | |
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn install | ||
- run: yarn build | ||
- name: Build | ||
run: | | ||
yarn install | ||
yarn build | ||
- run: yarn test --coverage --watchAll=false | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
|
@@ -70,7 +72,7 @@ jobs: | |
env: | ||
QUARKUS_DATASOURCE_USERNAME: user | ||
QUARKUS_DATASOURCE_PASSWORD: password | ||
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://backend-db:5432/searchpe_db | ||
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://backend-db:5432/searchpe_db | ||
QUARKUS_HIBERNATE_SEARCH_ORM_ELASTICSEARCH_USERNAME: any | ||
QUARKUS_HIBERNATE_SEARCH_ORM_ELASTICSEARCH_PASSWORD: any | ||
QUARKUS_HIBERNATE_SEARCH_ORM_ELASTICSEARCH_HOSTS: elasticsearch:9200 | ||
|
@@ -82,15 +84,17 @@ jobs: | |
--health-retries 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: yarn install | ||
- run: yarn build:instrumentation | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
run: | | ||
yarn install | ||
yarn build:instrumentation | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
record: false | ||
start: yarn run ui:start | ||
wait-on: 'http://localhost:3000' | ||
wait-on: "http://localhost:3000" | ||
wait-on-timeout: 120 | ||
config: pageLoadTimeout=100000 | ||
browser: ${{ matrix.browser }} | ||
|
@@ -122,15 +126,21 @@ jobs: | |
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- run: yarn install --network-timeout 1000000 | ||
- run: yarn build | ||
|
||
- run: echo 'window["SEARCHPE_API_URL"]=process.env.SEARCHPE_API_URL;' >> build/renderer.js | ||
- run: mv build electron/ | ||
- name: Build | ||
run: | | ||
yarn install --network-timeout 1000000 | ||
yarn build | ||
- run: yarn --cwd electron/ install --network-timeout 1000000 | ||
- run: yarn --cwd electron/ run electron:make | ||
- name: renderer.js | ||
run: | | ||
echo 'window["SEARCHPE_API_URL"]=process.env.SEARCHPE_API_URL;' >> build/renderer.js | ||
mv build electron/ | ||
- name: Electron | ||
run: | | ||
yarn --cwd electron/ install --network-timeout 1000000 | ||
yarn --cwd electron/ run electron:make | ||
- name: Upload archive | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
|
@@ -168,8 +178,10 @@ jobs: | |
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- run: yarn install | ||
- run: yarn build | ||
- name: Build | ||
run: | | ||
yarn install | ||
yarn build | ||
- name: Push to Quay.io | ||
uses: elgohr/[email protected] | ||
with: | ||
|
@@ -180,3 +192,22 @@ jobs: | |
dockerfile: Dockerfile | ||
snapshot: false | ||
tags: "master" | ||
- name: Push to GitHub Packages | ||
uses: elgohr/[email protected] | ||
with: | ||
registry: docker.pkg.github.com | ||
name: project-openubl/searchpe-ui/searchpe-ui | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: Dockerfile | ||
snapshot: false | ||
tags: "master" | ||
- name: Push to Docker Hub | ||
uses: elgohr/[email protected] | ||
with: | ||
name: projectopenubl/searchpe-ui | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: Dockerfile | ||
snapshot: false | ||
tags: "master" |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Release | |
on: | ||
push: | ||
tags: | ||
- '*' | ||
- "*" | ||
|
||
jobs: | ||
electron: | ||
|
@@ -17,15 +17,21 @@ jobs: | |
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- run: yarn install --network-timeout 1000000 | ||
- run: yarn build | ||
|
||
- run: echo 'window["SEARCHPE_API_URL"]=process.env.SEARCHPE_API_URL;' >> build/renderer.js | ||
- run: mv build electron/ | ||
- name: Build | ||
run: | | ||
yarn install --network-timeout 1000000 | ||
yarn build | ||
- name: renderer.js | ||
run: | | ||
echo 'window["SEARCHPE_API_URL"]=process.env.SEARCHPE_API_URL;' >> build/renderer.js | ||
mv build electron/ | ||
- run: yarn --cwd electron/ install --network-timeout 1000000 | ||
- run: yarn --cwd electron/ run electron:make | ||
- name: Electron | ||
run: | | ||
yarn --cwd electron/ install --network-timeout 1000000 | ||
yarn --cwd electron/ run electron:make | ||
- name: Prepare rpm and deb | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
|
@@ -75,8 +81,11 @@ jobs: | |
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- run: yarn install | ||
- run: yarn build | ||
- name: Build | ||
run: | | ||
yarn install | ||
yarn build | ||
- name: Push to Quay.io | ||
uses: elgohr/[email protected] | ||
with: | ||
|
@@ -98,10 +107,50 @@ jobs: | |
snapshot: false | ||
tags: "latest" | ||
|
||
- name: Push to GitHub Packages | ||
uses: elgohr/[email protected] | ||
with: | ||
registry: docker.pkg.github.com | ||
name: project-openubl/searchpe-ui/searchpe-ui | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: Dockerfile | ||
snapshot: false | ||
tag_names: true | ||
- name: Push to GitHub Packages | ||
uses: elgohr/[email protected] | ||
with: | ||
registry: docker.pkg.github.com | ||
name: project-openubl/searchpe-ui/searchpe-ui | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: Dockerfile | ||
snapshot: false | ||
tags: "latest" | ||
|
||
- name: Push to Docker Hub | ||
uses: elgohr/[email protected] | ||
with: | ||
name: projectopenubl/searchpe-ui | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: Dockerfile | ||
snapshot: false | ||
tag_names: true | ||
- name: Push to Docker Hub | ||
uses: elgohr/[email protected] | ||
with: | ||
name: projectopenubl/searchpe-ui | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: Dockerfile | ||
snapshot: false | ||
tags: "latest" | ||
|
||
release-gh: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
needs: [ electron, container-image ] | ||
needs: [electron, container-image] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Create Release | ||
|
@@ -158,5 +207,3 @@ jobs: | |
asset_path: searchpe-ui-macos/searchpe-ui-macos.zip | ||
asset_name: searchpe-ui-${{ steps.get_version.outputs.VERSION }}-macos.zip | ||
asset_content_type: application/zip | ||
|
||
|