Skip to content

Commit

Permalink
build(ci.yml): added actions/cache@v2 to skip reinstalling npm packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jan 13, 2021
1 parent 8a9c985 commit 43293b7
Show file tree
Hide file tree
Showing 3 changed files with 21,696 additions and 5 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Get cached modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Use Node.js latest
uses: actions/setup-node@v2-beta
with:
node-version: "*"
- run: npm install
- run: npm run build:umd

- name: Install all dependencies
run: npm install

- name: Compile TypeScript and build umd files
run: npm run build:umd

lint:
name: lint
Expand All @@ -22,10 +33,18 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js latest
uses: actions/setup-node@v2-beta
with:
node-version: "15"

- name: Get cached modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Run ESLint
run: npm run lint

Expand All @@ -36,11 +55,20 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js latest
uses: actions/setup-node@v2-beta
with:
node-version: "15"

- name: Get cached modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Build coverage
run: npm run test:coverage

- name: Run codecov
run: node ./node_modules/.bin/codecov
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ src/sgp4-legacy.js
src/sgp4-utils.js

test/performance
test/satellite/transform*

package-lock.json
test/satellite/transform*
Loading

0 comments on commit 43293b7

Please sign in to comment.