Feature/NR-57 Add method specific iteration delays to runner #162
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: Validate, build and push backend. | |
on: | |
push: | |
branches: [master] | |
paths: ["backend/**"] | |
pull_request: | |
branches: [master] | |
paths: ["backend/**"] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.12.1] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: Install backend dependencies | |
run: npm ci -w backend | |
- name: Prettier check | |
run: npm run -w backend prettier:check | |
- name: Unit tests | |
run: npm run -w backend unit-test | |
- name: Integration tests | |
run: npm run -w backend integration-test | |
build-and-push: | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: backend/Dockerfile | |
tags: sjakusch/steam-game-stats-backend:latest |