mehdi 3 years ago
parent b58446ca1e
commit 8d59559c3a
  1. 37
      .github/workflows/github-actions-demo.yml

@ -1,17 +1,26 @@
name: GitHub Actions Demo name: Node tests
on: [push]
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs: jobs:
Explore-GitHub-Actions: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - uses: actions/checkout@v2
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - name: Use Node.js ${{ matrix.node-version }}
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." uses: actions/setup-node@v2
- name: Check out repository code with:
uses: actions/checkout@v2 node-version: ${{ matrix.node-version }}
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." cache: 'npm'
- run: echo "🖥 The workflow is now ready to test your code on the runner." - run: npm ci
- name: List files in the repository - run: npm run lint
run: | - run: npm run test
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

Loading…
Cancel
Save