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
# Dieser Workflow führt eine saubere Installation der Node-Abhängigkeiten durch, speichert und stellt sie wieder her, erstellt den Quellcode und führt Tests in verschiedenen Node-Versionen aus. | ||
# Weitere Informationen finden Sie unter: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
name: Node.js CI | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
name: Node.js CI | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] # Aktualisiert auf die neuesten LTS-Versionen von Node.js | ||
steps: | ||
- uses: actions/checkout@v2 # Aktualisiert auf die neueste stabile Version | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 # Aktualisiert auf die neueste stabile Version | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test |