This repository was 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.12.2 in /rest-e2e-tests #1031
Workflow file for this run
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
--- | |
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/streamr-docker-dev-action@v1.0.1 | |
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/setup-buildx-action@v2.5.0 | |
with: | |
driver-opts: | | |
network=host | |
- name: Cache Docker layers | |
uses: actions/cache@v3.3.1 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-v1-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-v1- | |
- name: Build | |
uses: docker/build-push-action@v4.0.0 | |
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/streamr-docker-dev-action@v1.0.1 | |
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/metadata-action@v4.4.0 | |
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/setup-buildx-action@v2.5.0 | |
with: | |
driver-opts: | | |
network=host | |
- name: Cache Docker layers | |
uses: actions/cache@v3.3.1 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-v1-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-v1- | |
- name: Login to DockerHub | |
uses: docker/login-action@v2.1.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4.0.0 | |
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 }} |