Skip to content

Commit 9e94f46

Browse files
committed
ci: add ci
ci: run ci only on push to master [skip ci]
1 parent 7c02868 commit 9e94f46

File tree

2 files changed

+155
-0
lines changed

2 files changed

+155
-0
lines changed

.github/workflows/CI.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
Test:
10+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
11+
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
- macos-latest
19+
- windows-latest
20+
atom_channel: [stable, beta]
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: atom-community/action-setup-atom@v1
24+
with:
25+
channel: ${{ matrix.atom_channel }}
26+
27+
- name: Install dependencies
28+
run: |
29+
apm install
30+
31+
- name: Run tests 👩🏾‍💻
32+
run: npm run test
33+
34+
Lint:
35+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
36+
runs-on: ubuntu-latest
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
steps:
40+
- uses: actions/checkout@v2
41+
with:
42+
fetch-depth: 0
43+
- name: Commit lint ✨
44+
uses: wagoid/commitlint-github-action@v2
45+
46+
- name: Install dependencies
47+
run: npm install
48+
49+
# - name: Format ✨
50+
# run: npm run test.format
51+
52+
- name: Lint ✨
53+
run: npm run test.lint
54+
55+
Release:
56+
needs: [Test, Lint]
57+
if: github.ref == 'refs/heads/master' &&
58+
github.event.repository.fork == false
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- uses: atom-community/action-setup-atom@v1
63+
- uses: actions/setup-node@v2
64+
with:
65+
node-version: "12.x"
66+
- name: NPM install
67+
run: npm install
68+
- name: Build and Commit
69+
run: npm run build-commit
70+
# NOTE: uncomment when ready
71+
# - name: Release 🎉
72+
# uses: cycjimmy/semantic-release-action@v2
73+
# with:
74+
# extends: |
75+
# @semantic-release/apm-config
76+
# env:
77+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
# ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }}
79+
80+
Skip:
81+
if: contains(github.event.head_commit.message, '[skip ci]')
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Skip CI 🚫
85+
run: echo skip ci

.github/workflows/bump_deps.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Bump_Dependencies
2+
3+
on:
4+
schedule:
5+
- cron: "5 8 * * Sun" # 8:05 every Sunday
6+
7+
jobs:
8+
Bump_Dependencies:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: "12"
15+
- name: Setup PNPM
16+
uses: pnpm/action-setup@master
17+
with:
18+
version: latest
19+
20+
- name: setup npm-check-updates
21+
run: pnpm install -g npm-check-updates
22+
23+
- run: |
24+
ncu -u --dep prod
25+
pnpm install
26+
27+
- uses: tibdex/github-app-token@v1
28+
id: generate-token
29+
with:
30+
app_id: ${{ secrets.APP_ID }}
31+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
32+
- uses: peter-evans/create-pull-request@v3
33+
with:
34+
token: ${{ steps.generate-token.outputs.token }}
35+
commit-message: "fix: update Dependencies"
36+
title: "fix: update Dependencies"
37+
labels: Dependencies
38+
branch: "Bump_Dependencies"
39+
40+
Bump_devDependencies:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions/setup-node@v2
45+
with:
46+
node-version: "12"
47+
- name: Setup PNPM
48+
uses: pnpm/action-setup@master
49+
with:
50+
version: latest
51+
52+
- name: setup npm-check-updates
53+
run: pnpm install -g npm-check-updates
54+
55+
- run: |
56+
ncu -u --dep dev
57+
pnpm install
58+
59+
- uses: tibdex/github-app-token@v1
60+
id: generate-token
61+
with:
62+
app_id: ${{ secrets.APP_ID }}
63+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
64+
- uses: peter-evans/create-pull-request@v3
65+
with:
66+
token: ${{ steps.generate-token.outputs.token }}
67+
commit-message: "chore: update devDependencies"
68+
title: "chore: update devDependencies"
69+
labels: Dependencies
70+
branch: "Bump_devDependencies"

0 commit comments

Comments
 (0)