Skip to content

Commit

Permalink
try stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Feb 29, 2024
1 parent 035342b commit 9839d8c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
install:
name: Install
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -20,12 +21,14 @@ jobs:
- uses: actions/cache/save@v4
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
./node_modules/**/*
key: node-${{ hashFiles('**/package-lock.json') }}
lint:
needs: install
name: Lint
runs-on: ubuntu-latest
outputs:
cache-node-modules: ${{ steps.cache-node-modules.outputs.cache-primary-key }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
Expand All @@ -36,13 +39,13 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-ci-${{ github.run_number }}
key: node-${{ hashFiles('**/package-lock.json') }}
- 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 @@ -52,18 +55,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# can't use cache here due to different node versions
- 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-${{ hashFiles('**/package-lock.json') }}
- 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
Expand All @@ -73,7 +77,7 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-ci-${{ github.run_number }}
key: node-${{ hashFiles('**/package-lock.json') }}
- 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.6.1",
"@wfcd/eslint-config": "latest",
"c8": "^9.1.0",
"chai": "^4.3.4",
"coveralls": "^3.1.0",
Expand Down

0 comments on commit 9839d8c

Please sign in to comment.