Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Upgrade CodeSee workflow to version 2 (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow authored Dec 6, 2022
2 parents 373f877 + 6064ca9 commit e5f5264
Showing 1 changed file with 7 additions and 74 deletions.
81 changes: 7 additions & 74 deletions .github/workflows/codesee-arch-diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,83 +7,16 @@ on:
pull_request_target:
types: [opened, synchronize, reopened]

name: CodeSee Map
name: CodeSee

permissions: read-all

jobs:
test_map_action:
codesee:
runs-on: ubuntu-latest
continue-on-error: true
name: Run CodeSee Map Analysis
name: Analyze the repo with CodeSee
steps:
- name: checkout
id: checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

# codesee-detect-languages has an output with id languages.
- name: Detect Languages
id: detect-languages
uses: Codesee-io/codesee-detect-languages-action@latest

- name: Configure JDK 16
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # v3
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
with:
java-version: '16'
distribution: 'zulu'

# CodeSee Maps Go support uses a static binary so there's no setup step required.

- name: Configure Node.js 14
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
with:
node-version: '14'

- name: Configure Python 3.x
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
with:
python-version: '3.10'
architecture: 'x64'

- name: Configure Ruby '3.x'
uses: ruby/setup-ruby@4887fd8753fb3cf1a1e466e0e6d8bc08ca91b0bf # v1.124.0
if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }}
with:
ruby-version: '3.0'

# We need the rust toolchain because it uses rustc and cargo to inspect the package
- name: Configure Rust 1.x stable
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
if: ${{ fromJSON(steps.detect-languages.outputs.languages).rust }}
with:
toolchain: stable

- name: Generate Map
id: generate-map
uses: Codesee-io/codesee-map-action@latest
with:
step: map
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}
languages: ${{ steps.detect-languages.outputs.languages }}

- name: Upload Map
id: upload-map
uses: Codesee-io/codesee-map-action@latest
with:
step: mapUpload
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}

- name: Insights
id: insights
uses: Codesee-io/codesee-map-action@latest
- uses: Codesee-io/codesee-action@v2
with:
step: insights
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}

1 comment on commit e5f5264

@vercel
Copy link

@vercel vercel bot commented on e5f5264 Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.