Skip to content

Commit 4ff9cef

Browse files
committed
test: update CI
1 parent e05d399 commit 4ff9cef

File tree

2 files changed

+38
-37
lines changed

2 files changed

+38
-37
lines changed

.github/workflows/CI.yml

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ on:
33
- push
44
- pull_request
55

6-
defaults:
7-
run:
8-
shell: bash
9-
106
jobs:
117
Test:
128
if: "!contains(github.event.head_commit.message, '[skip ci]')"
@@ -29,15 +25,9 @@ jobs:
2925
run: apm -v
3026
- name: Install APM dependencies
3127
run: |
32-
apm ci # uses locked module. use `apm install` for non-locked
28+
apm install
3329
- name: Atom Package dependencies
34-
run: |
35-
npm install array-to-txt-file
36-
node -e 'const pkg = require("./package.json"); deps=Array.from(pkg["package-deps"]); const arrayToTxtFile = require("array-to-txt-file"); arrayToTxtFile(deps,"deps.txt", ()=>{});'
37-
cat deps.txt | \
38-
while read dep; do
39-
apm install $dep
40-
done
30+
run: node ./script/install-package-deps.js
4131
- name: Run tests 👩🏾‍💻
4232
run: npm run test
4333

@@ -48,8 +38,8 @@ jobs:
4838
- uses: actions/checkout@v2
4939
with:
5040
fetch-depth: 0
51-
- name: Commit lint ✨
52-
uses: wagoid/commitlint-github-action@v1
41+
# - name: Commit lint ✨
42+
# uses: wagoid/commitlint-github-action@v1
5343
- uses: actions/setup-node@v1
5444
with:
5545
node-version: "14.x"
@@ -59,29 +49,31 @@ jobs:
5949
- name: Lint ✨
6050
run: npm run lint
6151

62-
# Release:
63-
# needs: [Test, Lint]
64-
# if: github.ref == 'refs/heads/master' &&
65-
# github.event.repository.fork == false
66-
# runs-on: ubuntu-latest
67-
# steps:
68-
# - uses: actions/checkout@v2
69-
# - uses: UziTech/action-setup-atom@v1
70-
# - uses: actions/setup-node@v1
71-
# with:
72-
# node-version: "14.x"
73-
# - name: NPM install
74-
# run: npm ci
75-
# - name: Build and Commit
76-
# run: npm run build-commit
77-
# - name: Release 🎉
78-
# uses: cycjimmy/semantic-release-action@v2
79-
# with:
80-
# extends: |
81-
# @semantic-release/apm-config
82-
# env:
83-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84-
# ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }}
52+
Release:
53+
needs: [Test, Lint]
54+
if: github.ref == 'refs/heads/master' &&
55+
github.event.repository.fork == false
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v2
59+
- uses: UziTech/action-setup-atom@v1
60+
- uses: actions/setup-node@v1
61+
with:
62+
node-version: "14.x"
63+
- name: NPM install
64+
run: npm ci
65+
- name: Build and Commit
66+
run: npm run build-commit
67+
# NOTE: uncomment when ready
68+
# - name: Release 🎉
69+
# uses: cycjimmy/semantic-release-action@v2
70+
# with:
71+
# extends: |
72+
# @semantic-release/apm-config
73+
# env:
74+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
# ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }}
76+
8577
Skip:
8678
if: contains(github.event.head_commit.message, '[skip ci]')
8779
runs-on: ubuntu-latest

script/install-package-deps.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const { execSync } = require("child_process");
2+
3+
const pkg = require("../package.json");
4+
if (pkg["package-deps"]) {
5+
const deps = Array.from(pkg["package-deps"]);
6+
for (const dep of deps) {
7+
execSync(`apm install ${dep}`);
8+
}
9+
}

0 commit comments

Comments
 (0)