Skip to content

Commit 6909fc2

Browse files
Alexey Ryazanova-ryazanov
authored andcommitted
ci: minor changes in pull-request workflow
1 parent 1bbb677 commit 6909fc2

File tree

3 files changed

+107
-48
lines changed

3 files changed

+107
-48
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/pull-request.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: pull-request
2+
3+
run-name: Run CI for ${{ github.head_ref }}
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- master
9+
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14+
15+
jobs:
16+
run:
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
node: [ 8, 10, 12, 14, 16, 18, 20 ]
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
with:
26+
ref: ${{ github.head_ref }}
27+
28+
- name: Use Node.js ${{ matrix.node }}
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: ${{ matrix.node }}
32+
registry-url: 'https://registry.npmjs.org'
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Build
38+
run: npm run build
39+
40+
- name: Test
41+
run: npm run test:ci
42+
43+
- name: Coveralls
44+
uses: coverallsapp/github-action@master
45+
env:
46+
COVERALLS_FLAG_NAME: run-${{ matrix.node }}
47+
with:
48+
# https://github.com/orgs/community/discussions/25191#discussioncomment-3246770
49+
git-commit: ${{ github.event.pull_request.head.sha }}
50+
git-branch: ${{ github.head_ref }}
51+
parallel: true
52+
53+
coveralls-finalize:
54+
needs: run
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Coveralls finalize
58+
uses: coverallsapp/github-action@master
59+
with:
60+
# https://github.com/orgs/community/discussions/25191#discussioncomment-3246770
61+
git-commit: ${{ github.event.pull_request.head.sha }}
62+
git-branch: ${{ github.head_ref }}
63+
parallel-finished: true

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
if: "!contains(github.event.head_commit.message, 'chore(release)')"
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- run: echo 'Test'
16+
# - uses: actions/checkout@v2
17+
# with:
18+
# token: ${{ secrets.TINKOFF_BOT_PAT }}
19+
# fetch-depth: 0
20+
#
21+
# - name: Git Identity
22+
# run: |
23+
# git config --global user.name 'tinkoff-bot'
24+
# git config --global user.email 'tinkoff-bot@users.noreply.github.com'
25+
#
26+
# - uses: actions/setup-node@v2
27+
# with:
28+
# node-version: '14.x'
29+
# registry-url: 'https://registry.npmjs.org'
30+
#
31+
# - name: Clean install
32+
# run: npm ci
33+
#
34+
# - name: Create release commit and tag
35+
# run: |
36+
# npm run version -- --no-push
37+
#
38+
# - name: Push release commit and tag
39+
# run: git push --follow-tags
40+
#
41+
# - name: Publish packages
42+
# run: npm run publish:ci
43+
# env:
44+
# NODE_AUTH_TOKEN: ${{ secrets.TINKOFF_NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)