This repository was archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 410
92 lines (86 loc) · 2.47 KB
/
ci.yml
File metadata and controls
92 lines (86 loc) · 2.47 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
name: ci
on:
pull_request:
push:
branches:
- master
jobs:
tests:
name: tests
strategy:
matrix:
os: [ubuntu-18.04, macos-latest, windows-2019]
channel: [beta, nightly]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
ATOM_GITHUB_BABEL_ENV: coverage
MOCHA_TIMEOUT: 60000
UNTIL_TIMEOUT: 30000
steps:
- uses: actions/checkout@v1
- name: install Atom
uses: UziTech/action-setup-atom@v1
with:
channel: ${{ matrix.channel }}
- name: install dependencies
run: apm ci
- name: configure git
shell: bash
run: |
git config --global user.name Hubot
git config --global user.email hubot@github.com
- name: Run the tests
if: ${{ !contains(matrix.os, 'windows') }}
run: atom --test test
- name: Run the tests on Windows
if: ${{ contains(matrix.os, 'windows') }}
continue-on-error: true # due to https://github.com/atom/github/pull/2459#issuecomment-624725972
run: atom --test test
- name: report code coverage
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }}
BUILD_SOURCEBRANCH: ${{ github.event.ref }}
OS_NAME: ${{ matrix.os }}
run: |
npm run report:coverage
COVERAGE_NAME=$([[ "${OS_NAME}" == macos* ]] && echo "macOS" || echo "Linux")
bash <(curl -s https://codecov.io/bash) \
-n "${COVERAGE_NAME}" \
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
if: |
!contains(matrix.os, 'windows') &&
(success() || failure())
lint:
name: lint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: install Atom
uses: UziTech/action-setup-atom@v1
with:
channel: nightly
- name: install dependencies
run: apm ci
- name: lint
run: npm run lint
snapshot-tests:
name: snapshot tests
runs-on: ubuntu-18.04
env:
ATOM_GITHUB_BABEL_ENV: coverage
ATOM_GITHUB_TEST_SUITE: snapshot
steps:
- uses: actions/checkout@v1
- name: install Atom
uses: UziTech/action-setup-atom@v1
with:
channel: nightly
- name: install dependencies
run: apm ci
- name: run snapshot tests
run: atom --test test/