Adding jest tests
This commit is contained in:
43
.github/workflows/build-docker-latest.yml
vendored
43
.github/workflows/build-docker-latest.yml
vendored
@ -1,43 +0,0 @@
|
||||
name: Build Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [deploy/release,deploy/force-release]
|
||||
|
||||
jobs:
|
||||
build-and-push-docker-image:
|
||||
name: Build image and push to DockerHub
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Github Packages
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GHCR_PAT }}
|
||||
|
||||
- name: Build image and push to Docker Hub and GitHub Container Registry
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
tags: |
|
||||
jaedb/iris:latest
|
||||
# build on feature branches, push only on master branch
|
||||
push: ${{ github.ref == 'refs/heads/master' }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
4
.github/workflows/build-docker.yml
vendored
4
.github/workflows/build-docker.yml
vendored
@ -2,7 +2,7 @@ name: Build Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop]
|
||||
branches: [deploy/release,deploy/force-release]
|
||||
|
||||
jobs:
|
||||
build-and-push-docker-image:
|
||||
@ -35,7 +35,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
tags: |
|
||||
jaedb/iris:develop
|
||||
jaedb/iris:latest
|
||||
# build on feature branches, push only on master branch
|
||||
push: ${{ github.ref == 'refs/heads/master' }}
|
||||
|
||||
|
||||
22
.github/workflows/jest-tests.yml
vendored
Normal file
22
.github/workflows/jest-tests.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: Jest tests
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Code Climate test-reporter
|
||||
run: |
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
- name: Install modules
|
||||
run: npm install
|
||||
- name: Run tests
|
||||
run: |
|
||||
./cc-test-reporter before-build
|
||||
npm run test
|
||||
./cc-test-reporter after-build --exit-code $?
|
||||
Reference in New Issue
Block a user