-
Notifications
You must be signed in to change notification settings - Fork 136
57 lines (46 loc) · 1.54 KB
/
monokle-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: monokle-lint
on:
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
lint-mac:
runs-on: macOS-latest
steps:
# Make sure build is clean and no files from a previous run are re-used.
- name: Cleanup files before run
run: |
rm -rf *
rm /Users/runner/.npm/_logs/*.log || true
if: ${{ always() }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- name: Checkout Project
uses: actions/checkout@v2
# Check memory and cpu
- name: Verify Runner Resources
run: |
sysctl -n machdep.cpu.brand_string
vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-16s % 16.2f Mi\n", "$1:", $2 * $size / 1048576);'
- name: Get Node Version
run: |
cat .nvmrc
echo "::set-output name=nodeversion::$(cat .nvmrc)"
id: get-node-version
- name: Use Node.js ${{ steps.get-node-version.outputs.nodeversion }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.get-node-version.outputs.nodeversion }}
cache: 'npm'
- name: Install Dependencies
run: |
env
echo "npm: $(npm --version)"
echo "node: $(node --version)"
npm install --production=false
# - name: Verify Dependencies
# run: |
# ls -la
# npm list --depth=1
- name: Lint
run: |
npm run lint