mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 15:16:08 +00:00
1f06ac36d3
* Simulate input to fix unit tests
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
---
|
|
name: action
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
jobs:
|
|
check_integrity:
|
|
name: Expected local npm actions
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '14'
|
|
- run: npm install -g npm
|
|
- run: npm install
|
|
- run: npm run build
|
|
- run: npm run format
|
|
- run: npm install -g markdownlint-cli
|
|
- run: npm run markdownlint
|
|
- run: npm run shellcheck
|
|
- run: npm run yamllint
|
|
- run: npm run jslint
|
|
- name: Check if build left artifacts
|
|
run: git diff --exit-code --ignore-space-at-eol
|
|
|
|
unit_tests_ubuntu:
|
|
name: Unit tests (Ubuntu)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '14'
|
|
- run: npm ci
|
|
- run: npm test
|
|
- name: .tool-versions test
|
|
id: setup-beam
|
|
uses: ./
|
|
with:
|
|
version-file: __tests__/.tool-versions
|
|
version-type: strict
|
|
|
|
unit_tests_windows:
|
|
name: Unit tests (Windows)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '14'
|
|
- run: npm install --production
|
|
- run: npm test
|