Skip to content

Commit 013d2b8

Browse files
authored
Create devcontainer for codespaces + update all dev dependencies (#375)
* Create devcontainer for codespaces * Use node 16 for devcontainer and CI * Fix node version incompatibility error * Remove caching * Add npm build to check-dist * Remove new caching * use npm install * Test node 14 * Update check dist with node 16 * Use node 18.x for check-dist * Npm install vs CI * Update package.json scripts * test * Remove caching * npm run test * testing * test * test * One more test * Test * test * Update everything * use vercel * Test * Update index.js * Test * Remove codeql warnings * Use NPM CI vs install * Small tweaks to existing workflows
1 parent 055b8b3 commit 013d2b8

10 files changed

+17271
-20721
lines changed

.devcontainer/devcontainer.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "@actions/upload-artifact",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-16"
6+
}

.eslintrc.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
55
"extends": [
66
"eslint:recommended",
7-
"plugin:@typescript-eslint/eslint-recommended",
8-
"plugin:@typescript-eslint/recommended",
97
"plugin:import/errors",
108
"plugin:import/warnings",
119
"plugin:import/typescript",
12-
"plugin:prettier/recommended",
13-
"prettier/@typescript-eslint"
10+
"plugin:prettier/recommended"
1411
],
1512
"rules": {
1613
"@typescript-eslint/no-empty-function": "off"

.github/workflows/check-dist.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424

25-
- name: Set Node.js 12.x
26-
uses: actions/setup-node@v1
25+
- name: Setup Node 16
26+
uses: actions/setup-node@v3
2727
with:
28-
node-version: 12.x
29-
28+
node-version: 16.x
29+
cache: 'npm'
30+
3031
- name: Install dependencies
3132
run: npm ci
3233

3334
- name: Move the committed index.js file
3435
run: mv dist/index.js /tmp
3536

37+
- name: Rebuild with tsc
38+
run: npm run build
39+
3640
- name: Rebuild the index.js file
3741
run: npm run release
3842

@@ -41,7 +45,7 @@ jobs:
4145
id: diff
4246

4347
# If index.js was different than expected, upload the expected version as an artifact
44-
- uses: actions/upload-artifact@v2
48+
- uses: actions/upload-artifact@v3
4549
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
4650
with:
4751
name: index.js

.github/workflows/codeql-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121

2222
# Initializes the CodeQL tools for scanning.
2323
- name: Initialize CodeQL
24-
uses: github/codeql-action/init@v1
24+
uses: github/codeql-action/init@v2
2525
# Override language selection by uncommenting this and choosing your languages
2626
# with:
2727
# languages: go, javascript, csharp, python, cpp, java
2828

2929
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
3030
# If this step fails, then you should remove it and run the build manually (see below)
3131
- name: Autobuild
32-
uses: github/codeql-action/autobuild@v1
32+
uses: github/codeql-action/autobuild@v2
3333

3434
# ℹ️ Command-line programs to run using the OS shell.
3535
# 📚 https://git.io/JvXDl
@@ -43,4 +43,4 @@ jobs:
4343
# make release
4444

4545
- name: Perform CodeQL Analysis
46-
uses: github/codeql-action/analyze@v1
46+
uses: github/codeql-action/analyze@v2

.github/workflows/test.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,27 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v3
2727

28-
- name: Set Node.js 12.x
29-
uses: actions/setup-node@v1
28+
- name: Setup Node 16
29+
uses: actions/setup-node@v3
3030
with:
31-
node-version: 12.x
31+
node-version: 16.x
32+
cache: 'npm'
3233

3334
- name: Install dependencies
3435
run: npm ci
3536

3637
- name: Compile
3738
run: npm run build
3839

39-
- name: npm test
40-
run: npm test
41-
4240
- name: Lint
4341
run: npm run lint
4442

4543
- name: Format
4644
run: npm run format-check
4745

46+
- name: Test
47+
run: npm run test
48+
4849
# Test end-to-end by uploading two artifacts and then downloading them
4950
- name: Create artifact files
5051
run: |

0 commit comments

Comments
 (0)