Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

test(deps-dev): bump @types/node from 18.6.1 to 20.6.5 in /rest-e2e-tests #975

test(deps-dev): bump @types/node from 18.6.1 to 20.6.5 in /rest-e2e-tests

test(deps-dev): bump @types/node from 18.6.1 to 20.6.5 in /rest-e2e-tests #975

Workflow file for this run

---
name: CI & CD
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'docs/swagger.json'
pull_request:
paths-ignore:
- '**.md'
- 'docs/swagger.json'
concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
GRAILS_WAR_ENV: 'test'
GRAILS_VERSION: '2.5.6'
jobs:
test:
name: Build, lint and test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8.0.282'
distribution: 'zulu'
- uses: sdkman/sdkman-action@master
id: sdkman-grails
with:
candidate: grails
version: ${{ env.GRAILS_VERSION }}
- name: Install Grails
run: |
unzip ${{ steps.sdkman-grails.outputs.file }} -d "$HOME"
echo "$HOME/grails-$GRAILS_VERSION/bin" >> $GITHUB_PATH
- name: Build
run: |
make -f Makefile.ci compile
- name: Unit Test
run: |
make -f Makefile.ci test-unit
- name: Start Streamr Docker Stack
uses: streamr-dev/[email protected]
with:
services-to-start: "mysql redis"
- name: Integration test
run: |
make -f Makefile.ci test-integration
- name: Stop Streamr Docker Stack
if: always()
run: |
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
e2e:
name: End to end test
runs-on: ubuntu-20.04
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver-opts: |
network=host
- name: Cache Docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-v1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-v1-
- name: Build
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: false
load: true
tags: streamr/core-api:dev
build-args: |
GRAILS_WAR_ENV=${{ env.GRAILS_WAR_ENV }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Start Streamr Docker Stack
uses: streamr-dev/[email protected]
with:
services-to-start: "mysql redis cassandra parity-node0 parity-sidechain-node0 bridge broker-node-no-storage-1 broker-node-storage-1 nginx smtp"
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: 'rest-e2e-tests/.nvmrc'
- name: Setup End to End tests
run: |
streamr-docker-dev start core-api
streamr-docker-dev wait
cd rest-e2e-tests
npm ci
- name: Run End to End tests
run: |
cd rest-e2e-tests
npm run test:e2e
- name: Stop Streamr Docker Stack
if: always()
run: |
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
build-docker:
name: Build Docker and push to Docker Hub
needs:
- test
- e2e
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: docker/[email protected]
with:
images: streamr/core-api
tags: |
type=sha
type=ref,event=pr
type=semver,pattern=v{{version}}
type=raw,value=dev
flavor: |
latest=auto
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver-opts: |
network=host
- name: Cache Docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-v1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-v1-
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
load: false
build-args: |
GRAILS_WAR_ENV=${{ env.GRAILS_WAR_ENV }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}