Skip to content

Commit

Permalink
fix(ci): clean up numerous disparate installs (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno authored Feb 29, 2024
1 parent 879252c commit 2307fe4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 17 deletions.
51 changes: 36 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,44 @@ on:
- main

jobs:
install:
name: Install
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: |
npm ci --omit=optional
npm install --no-save warframe-worldstate-parser@^3.x warframe-worldstate-data@^2.x
- uses: actions/cache/save@v4
with:
path: |
./node_modules/**/*
key: node-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
lint:
needs: install
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Install Dependencies
run: |
npm ci --omit=optional
npm install --no-save warframe-worldstate-parser@^3.x warframe-worldstate-data@^2.x
- uses: actions/cache/restore@v4
with:
path: |
./node_modules/**/*
key: node-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- name: Run linters
run: npm run lint
test:
name: Test
runs-on: ubuntu-latest
needs: lint
needs: [lint]
strategy:
matrix:
node-version: ['lts/*', '20', '18']
Expand All @@ -34,27 +53,29 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: |
npm ci --omit=optional
npm install --no-save warframe-worldstate-parser@^3.x warframe-worldstate-data@^2.x
- uses: actions/cache/restore@v4
with:
path: |
./node_modules/**/*
key: node-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- run: npm test
env:
CI: true
parallel: true
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: lint
needs: [lint, install]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Install Dependencies
run: |
npm ci --omit=optional
npm install --no-save warframe-worldstate-parser@^3.x warframe-worldstate-data@^2.x
- uses: actions/cache/restore@v4
with:
path: |
./node_modules/**/*
key: node-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- run: npm test
env:
CI: true
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"twitter": "^1.7.1"
},
"devDependencies": {
"@wfcd/eslint-config": "^1.3.3",
"@wfcd/eslint-config": "latest",
"c8": "^9.1.0",
"chai": "^4.3.4",
"coveralls": "^3.1.0",
Expand Down

0 comments on commit 2307fe4

Please sign in to comment.