Skip to content

Commit fcfaa01

Browse files
committed
ci: staging branch and CI/CD changes
1 parent 9900d7a commit fcfaa01

16 files changed

+1021
-252
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"no-useless-catch": 1,
2727
"no-prototype-builtins": 1,
2828
"no-constant-condition": 0,
29-
"no-useless-escape" : 0,
29+
"no-useless-escape": 0,
3030
"no-console": "error",
3131
"require-yield": 0,
3232
"eqeqeq": ["error", "smart"],
+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request_target:
6+
types: [opened, synchronize, reopened]
7+
8+
name: CodeSee Map
9+
10+
jobs:
11+
test_map_action:
12+
runs-on: ubuntu-latest
13+
continue-on-error: true
14+
name: Run CodeSee Map Analysis
15+
steps:
16+
- name: checkout
17+
id: checkout
18+
uses: actions/checkout@v2
19+
with:
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
21+
ref: ${{ github.event.pull_request.head.ref }}
22+
fetch-depth: 0
23+
24+
# codesee-detect-languages has an output with id languages.
25+
- name: Detect Languages
26+
id: detect-languages
27+
uses: Codesee-io/codesee-detect-languages-action@latest
28+
29+
- name: Configure JDK 16
30+
uses: actions/setup-java@v2
31+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
32+
with:
33+
java-version: '16'
34+
distribution: 'zulu'
35+
36+
# CodeSee Maps Go support uses a static binary so there's no setup step required.
37+
38+
- name: Configure Node.js 14
39+
uses: actions/setup-node@v2
40+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
41+
with:
42+
node-version: '14'
43+
44+
- name: Configure Python 3.x
45+
uses: actions/setup-python@v2
46+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
47+
with:
48+
python-version: '3.10'
49+
architecture: 'x64'
50+
51+
- name: Configure Ruby '3.x'
52+
uses: ruby/setup-ruby@v1
53+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }}
54+
with:
55+
ruby-version: '3.0'
56+
57+
# We need the rust toolchain because it uses rustc and cargo to inspect the package
58+
- name: Configure Rust 1.x stable
59+
uses: actions-rs/toolchain@v1
60+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).rust }}
61+
with:
62+
toolchain: stable
63+
64+
- name: Generate Map
65+
id: generate-map
66+
uses: Codesee-io/codesee-map-action@latest
67+
with:
68+
step: map
69+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
70+
github_ref: ${{ github.ref }}
71+
languages: ${{ steps.detect-languages.outputs.languages }}
72+
73+
- name: Upload Map
74+
id: upload-map
75+
uses: Codesee-io/codesee-map-action@latest
76+
with:
77+
step: mapUpload
78+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
79+
github_ref: ${{ github.ref }}
80+
81+
- name: Insights
82+
id: insights
83+
uses: Codesee-io/codesee-map-action@latest
84+
with:
85+
step: insights
86+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
87+
github_ref: ${{ github.ref }}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
/dist
33
.env*
44
!.env.example
5+
# nix
56
/result*
67
/builds
8+
# node-gyp
9+
/build
10+
# prebuildify
11+
/prebuilds
712

813
# Logs
914
logs

0 commit comments

Comments
 (0)