-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 1.84 KB
/
main.yml
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
name: CI
on: push
jobs:
lint-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
scope: '@codexteam'
- name: Restore Yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Enable Corepack
run: corepack enable
- name: Use specified Yarn version
run: corepack prepare [email protected] --activate
- name: Install dependecies
run: yarn install
- name: Test Eslint
run: yarn lint
- name: Run unit tests
run: yarn test
# - name: Build library
# run: yarn build
# - name: Publish library
# if: ${{ github.ref == 'refs/heads/main' }}
# run: yarn publish --access=public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# notify:
# needs: lint-test-build-publish
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Get package info
# id: package
# uses: codex-team/action-nodejs-package-info@v1
# - name: Send a message
# uses: codex-team/action-codexbot-notify@v1
# with:
# webhook: ${{ secrets.CODEX_BOT_WEBHOOK }}
# message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published'
# parse_mode: 'markdown'
# disable_web_page_preview: true