feature/NR-74 Introduce release date data model #100
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 backend. | |
on: | |
pull_request: | |
branches: [master] | |
paths: ["backend/**"] | |
types: | |
- opened | |
- synchronize | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.18.2] | |
steps: | |
- name: Check out the repo | |
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 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: sjakusch/steam-game-stats-backend | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: false | |
file: backend/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |