-
Notifications
You must be signed in to change notification settings - Fork 337
97 lines (83 loc) · 2.2 KB
/
CI.yml
File metadata and controls
97 lines (83 loc) · 2.2 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
pull_request:
push:
# branches:
# - master
jobs:
Build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
atom_channel:
- stable
steps:
- uses: actions/checkout@v2
- uses: atom-community/action-setup-atom@v1
with:
channel: ${{ matrix.atom_channel }}
- name: Install dependencies and build
run: |
apm install
npm run clean
npm run tsc || echo done
npm run build
- name: Upload built files
uses: actions/upload-artifact@v2
with:
path: |
./dist
Test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: Build
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
atom_channel: [stable, beta]
steps:
- uses: actions/checkout@v2
- uses: atom-community/action-setup-atom@v1
with:
channel: ${{ matrix.atom_channel }}
- name: Download articats
uses: actions/download-artifact@v2
- name: Place artifacts
shell: bash
run: |
rm -rf ./dist
mkdir ./dist
cp -r ./artifact/* ./dist
rm -rf ./artifact
- name: Install dependencies
run: |
apm install
- name: Run tests 👩🏾💻
run: npm run test
Lint:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- if: "!contains(github.event.head_commit.message, 'Prepare')"
name: Commit lint ✨
uses: wagoid/commitlint-github-action@v2
- name: Install dependencies
run: npm install --ignore-scripts
- name: Format ✨
run: npm run test.format
- name: Lint ✨
run: npm run test.lint