mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 15:16:08 +00:00
e3f6ffe287
* Provide an input for github tokens - By providing an input for github tokens with a default users no longer have to pass the github token via their environment across workflows. - Remove GITHUB_TOKEN from our environment in all workflows * Don't run workflows on main on pull requests Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
---
|
|
name: action
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
|
|
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
|