Skip to content

Commit

Permalink
Update github's actions
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Sep 15, 2024
1 parent d20de9d commit 96d8354
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 39 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # fetch all history
show-progress: false
fetch-depth: 0 # fetch all reachable commits
filter: tree:0 # while fetching trees and blobs on-demand

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -29,7 +31,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload npm folder
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: changelog
path: ./changelog.txt
47 changes: 24 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Run tests
run: npm run testonly

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand All @@ -37,15 +37,15 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

Expand All @@ -100,15 +100,15 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -130,17 +130,18 @@ jobs:
security-events: write # for codeql-action
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'javascript, typescript'
languages: 'javascript, typescript, c-cpp'
queries: security-and-quality

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

buildDemo:
name: Build Demo
Expand All @@ -149,15 +150,15 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -166,7 +167,7 @@ jobs:
run: npm run build:demo

- name: Upload demo-dist folder
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
name: demoDist
path: ./demo-dist
Expand All @@ -178,15 +179,15 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -195,7 +196,7 @@ jobs:
run: npm run build:release

- name: Upload npm folder
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: npmDist
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'
node-version-file: 'package.json'
# 'registry-url' is required for 'npm publish'
registry-url: 'https://registry.npmjs.org'

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: npmDist
path: npmDist
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
contents: read # for actions/checkout
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Dependency review
uses: actions/dependency-review-action@v2
uses: actions/dependency-review-action@v4
with:
comment-summary-in-pr: always
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
with:
artifact_name: demoDist
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

3 changes: 3 additions & 0 deletions package-lock.json

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

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"bugs": {
"url": "https://github.com/graphql-kit/graphql-voyager/issues"
},
"engines": {
"node": ">=20.0.0"
},
"main": "dist/voyager.lib.js",
"types": "typings/index.d.ts",
"scripts": {
Expand All @@ -27,7 +30,7 @@
"bundle:lib": "webpack --mode=production --env lib",
"bundle": "rm -rf dist && npm run bundle:lib && npm run bundle:standalone",
"compile:middleware": "tsc -d src/middleware/index.ts --outDir middleware --lib ES6,DOM,esnext.asynciterable",
"build:worker": "npm run clean:worker && docker-compose up --abort-on-container-exit --build build-worker",
"build:worker": "npm run clean:worker && docker compose up --abort-on-container-exit --build build-worker",
"build:release": "npm run build:worker && npm run bundle && npm run compile:middleware && npm run declarations",
"build:demo": "npm run build:release && rm -rf demo-dist && cp -R demo/ demo-dist/ && cp dist/voyager.css* dist/voyager.standalone.js* demo-dist/",
"stats": "NODE_ENV=production webpack --json --mode=production > stats.json",
Expand All @@ -36,9 +39,9 @@
"prettier": "prettier --write --list-different . **/*.svg",
"prettier:check": "prettier --check . **/*.svg",
"check:spelling": "cspell --cache --no-progress '**/*'",
"testonly": "npm run build:demo && npm pack && docker-compose up --abort-on-container-exit --build test",
"testonly": "npm run build:demo && npm pack && docker compose up --abort-on-container-exit --build test",
"declarations": "tsc --emitDeclarationOnly -p tsconfig.lib.json",
"update-snapshots": "docker-compose up --build update-snapshots"
"update-snapshots": "docker compose up --build update-snapshots"
},
"peerDependencies": {
"graphql": ">=16.5.0",
Expand Down

0 comments on commit 96d8354

Please sign in to comment.