Skip to content

Commit

Permalink
Revert "Turn action into a no-op (#23)" (#24)
Browse files Browse the repository at this point in the history
This reverts commit c736a1b.
  • Loading branch information
elousiv authored Jul 10, 2024
1 parent c736a1b commit db076ce
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 181 deletions.
81 changes: 79 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,83 @@ inputs:
runs:
using: "composite"
steps:
- name: CodeSee No-Op
- name: Check out the code
uses: actions/checkout@v3
id: checkout
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Configure Node.js 18
uses: actions/setup-node@v3
with:
node-version: "18"
if: ${{ inputs.lang-setup == 'all' || contains(inputs.lang-setup, 'node') }}

- name: Detect Languages
id: detect-languages
run: node ${{ github.action_path }}/detect-lang/dist/index.js
shell: bash

- name: Configure JDK 16
uses: actions/setup-java@v3
if: ${{ (inputs.lang-setup == 'all' || contains(inputs.lang-setup, 'jdk')) && 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 Python 3.x
uses: actions/setup-python@v4
if: ${{ (inputs.lang-setup == 'all' || contains(inputs.lang-setup, 'python')) && fromJSON(steps.detect-languages.outputs.languages).python }}
with:
python-version: "3.x"
architecture: "x64"

# We need the rust toolchain because it uses rustc and cargo to inspect the package
- name: Configure Rust 1.x stable
uses: Codesee-io/rust-toolchain@stable
if: ${{ (inputs.lang-setup == 'all' || contains(inputs.lang-setup, 'rust')) && fromJSON(steps.detect-languages.outputs.languages).rust }}

- name: Configure .NET SDK 7
uses: actions/setup-dotnet@v3
if: ${{ (inputs.lang-setup == 'all' || contains(inputs.lang-setup, '.net')) && fromJSON(steps.detect-languages.outputs.languages).dot-net }}
with:
dotnet-version: "7.x"
dotnet-quality: "ga"

- name: Generate Map
id: generate-map
run: node ${{ github.action_path }}/map/dist/index.js
shell: bash
env:
step: map
api_token: ${{ inputs.codesee-token }}
github_ref: ${{ github.ref }}
languages: ${{ steps.detect-languages.outputs.languages }}
codesee_url: ${{ inputs.codesee-url }}
NODE_OPTIONS: --max-old-space-size=6144

- name: Upload Map
id: upload-map
run: node ${{ github.action_path }}/map/dist/index.js
shell: bash
env:
step: mapUpload
api_token: ${{ inputs.codesee-token }}
github_ref: ${{ github.ref }}
codesee_url: ${{ inputs.codesee-url }}
NODE_OPTIONS: --max-old-space-size=6144

- name: Insights
id: insights
run: node ${{ github.action_path }}/map/dist/index.js
shell: bash
run: echo "CodeSee no longer needs the action to run"
env:
step: insights
api_token: ${{ inputs.codesee-token }}
github_ref: ${{ github.ref }}
codesee_url: ${{ inputs.codesee-url }}
NODE_OPTIONS: --max-old-space-size=6144
4 changes: 2 additions & 2 deletions detect-lang/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4160,8 +4160,8 @@ async function removeNpmrc() {
}

async function main() {
// await core.group("Removing .npmrc if exists", removeNpmrc);
// await core.group("Detect Languages", runCodeseeDetectLanguages);
await core.group("Removing .npmrc if exists", removeNpmrc);
await core.group("Detect Languages", runCodeseeDetectLanguages);
}

main()
Expand Down
4 changes: 2 additions & 2 deletions detect-lang/src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ async function removeNpmrc() {
}

async function main() {
// await core.group("Removing .npmrc if exists", removeNpmrc);
// await core.group("Detect Languages", runCodeseeDetectLanguages);
await core.group("Removing .npmrc if exists", removeNpmrc);
await core.group("Detect Languages", runCodeseeDetectLanguages);
}

main()
Expand Down
Loading

0 comments on commit db076ce

Please sign in to comment.