This repository has been archived by the owner on Aug 7, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 2.06 KB
/
test.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
name: Unit Tests
on:
push:
branches:
- main
pull_request:
jobs:
build-cache:
name: build-cache
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore Dependency Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn
- name: Restore Build Cache
uses: actions/cache@v1
with:
path: dist
key: ${{ runner.os }}-12-${{ hashFiles('**/createDJSBot.ts') }}
- name: Build package
run: yarn build
test:
name: test
needs: build-cache
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore Dependency Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn
- name: Restore Build Cache
uses: actions/cache@v1
with:
path: dist
key: ${{ runner.os }}-12-${{ hashFiles('**/createDJSBot.ts') }}
- name: Create TS Template
run: node ./dist/index.js --interactive=false --name=typescript_template --description=typescript_bot --author=circleci --license=MIT --repo='https://github.com/favna/tsbot' --gitinit=false --manager=yarn --template=typescript --prefix=. --ownerid=1234 --token=12345
- name: Create JS Template
run: node ./dist/index.js --interactive=false --name=javascript_template --description=javascript_bot --author=circleci --license=MIT --repo='https://github.com/favna/jsbot' --gitinit=false --manager=yarn --template=javascript --prefix=. --ownerid=1234 --token=12345
- name: Test
run: yarn test