Skip to content

github actions on main #1

github actions on main

github actions on main #1

Workflow file for this run

name: "Tests"
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
Test:
strategy:
matrix:
node_version: ["lts/*", "*"]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
check-latest: true
- name: Install Dependencies
run: npm ci
- name: Test πŸ‘©πŸ½β€πŸ’»
run: npm run test
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install Dependencies
run: npm ci
- name: Lint ✨
run: npm run test:lint
Format:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install Dependencies
run: npm ci
- name: Format πŸ’–
run: npm run test:format
# Release:
# permissions:
# contents: write
# needs: [Test, Lint, Format]
# if: |
# github.ref == 'refs/heads/main' &&
# github.event.repository.fork == false
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# - name: Install Node
# uses: actions/setup-node@v3
# with:
# node-version: 'lts/*'
# - name: Install Dependencies
# run: npm ci
# - name: Release πŸŽ‰
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: npx semantic-release