mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-12 22:17:24 +00:00
tsting
This commit is contained in:
parent
bb6f970126
commit
63bb20cf1f
7 changed files with 53 additions and 175 deletions
69
.github/workflows/codeql-analysis.yml
vendored
69
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -1,69 +0,0 @@
|
||||||
|
|
||||||
#
|
|
||||||
# You may wish to alter this file to override the set of languages analyzed,
|
|
||||||
# or to provide custom queries or build logic.
|
|
||||||
#
|
|
||||||
# ******** NOTE ********
|
|
||||||
# We have attempted to detect the languages in your repository. Please check
|
|
||||||
# the `language` matrix defined below to confirm you have the correct set of
|
|
||||||
# supported CodeQL languages.
|
|
||||||
#
|
|
||||||
name: "CodeQL"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: [ master ]
|
|
||||||
schedule:
|
|
||||||
- cron: '24 6 * * 5'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: [ 'javascript' ]
|
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
||||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v2
|
|
||||||
with:
|
|
||||||
languages: ${{ matrix.language }}
|
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
||||||
# By default, queries listed here will override any specified in a config file.
|
|
||||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
||||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v2
|
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
|
||||||
# 📚 https://git.io/JvXDl
|
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
||||||
# and modify them (or add more) to build your code if your project
|
|
||||||
# uses a compiled language
|
|
||||||
|
|
||||||
#- run: |
|
|
||||||
# make bootstrap
|
|
||||||
# make release
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v2
|
|
||||||
76
.github/workflows/main.yml
vendored
76
.github/workflows/main.yml
vendored
|
|
@ -33,41 +33,41 @@ jobs:
|
||||||
name: codecov-version
|
name: codecov-version
|
||||||
version: v0.1.0
|
version: v0.1.0
|
||||||
verbose: true
|
verbose: true
|
||||||
run:
|
# run:
|
||||||
runs-on: ${{ matrix.os }}
|
# runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
os: [ubuntu-latest]
|
# os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: npm install
|
# run: npm install
|
||||||
- name: Lint
|
# - name: Lint
|
||||||
run: npm run lint
|
# run: npm run lint
|
||||||
- name: Run tests and collect coverage
|
# - name: Run tests and collect coverage
|
||||||
run: npm run test
|
# run: npm run test
|
||||||
- name: Upload coverage to Codecov (script)
|
# - name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
# uses: ./
|
||||||
with:
|
# with:
|
||||||
files: ./coverage/script/coverage-final.json
|
# files: ./coverage/script/coverage-final.json
|
||||||
flags: script,${{ matrix.os }}
|
# flags: script,${{ matrix.os }}
|
||||||
name: codecov-script
|
# name: codecov-script
|
||||||
verbose: true
|
# verbose: true
|
||||||
- name: Upload coverage to Codecov (demo)
|
# - name: Upload coverage to Codecov (demo)
|
||||||
uses: ./
|
# uses: ./
|
||||||
with:
|
# with:
|
||||||
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
|
# files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
|
||||||
file: ./coverage/coverage-final.json
|
# file: ./coverage/coverage-final.json
|
||||||
flags: demo,${{ matrix.os }}
|
# flags: demo,${{ matrix.os }}
|
||||||
name: codecov-demo
|
# name: codecov-demo
|
||||||
verbose: true
|
# verbose: true
|
||||||
- name: Upload coverage to Codecov (version)
|
# - name: Upload coverage to Codecov (version)
|
||||||
uses: ./
|
# uses: ./
|
||||||
with:
|
# with:
|
||||||
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
|
# files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
|
||||||
file: ./coverage/coverage-final.json
|
# file: ./coverage/coverage-final.json
|
||||||
flags: version,${{ matrix.os }}
|
# flags: version,${{ matrix.os }}
|
||||||
name: codecov-version
|
# name: codecov-version
|
||||||
version: v0.1.0
|
# version: v0.1.0_8880
|
||||||
verbose: true
|
# verbose: true
|
||||||
|
|
|
||||||
61
.github/workflows/scorecards-analysis.yml
vendored
61
.github/workflows/scorecards-analysis.yml
vendored
|
|
@ -1,61 +0,0 @@
|
||||||
name: Scorecards supply-chain security
|
|
||||||
on:
|
|
||||||
# Only the default branch is supported.
|
|
||||||
branch_protection_rule:
|
|
||||||
schedule:
|
|
||||||
- cron: '43 20 * * 1'
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
# Declare default permissions as read only.
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analysis:
|
|
||||||
name: Scorecards analysis
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
# Needed to upload the results to code-scanning dashboard.
|
|
||||||
security-events: write
|
|
||||||
# Used to receive a badge. (Upcoming feature)
|
|
||||||
id-token: write
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout code"
|
|
||||||
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: "Run analysis"
|
|
||||||
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
|
|
||||||
with:
|
|
||||||
results_file: results.sarif
|
|
||||||
results_format: sarif
|
|
||||||
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
|
|
||||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
|
||||||
# - you are installing Scorecards on a *private* repository
|
|
||||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
|
||||||
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
|
|
||||||
|
|
||||||
# Publish the results for public repositories to enable scorecard badges. For more details, see
|
|
||||||
# https://github.com/ossf/scorecard-action#publishing-results.
|
|
||||||
# For private repositories, `publish_results` will automatically be set to `false`, regardless
|
|
||||||
# of the value entered here.
|
|
||||||
publish_results: true
|
|
||||||
|
|
||||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
||||||
# format to the repository Actions tab.
|
|
||||||
- name: "Upload artifact"
|
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
||||||
with:
|
|
||||||
name: SARIF file
|
|
||||||
path: results.sarif
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
|
||||||
- name: "Upload to code-scanning"
|
|
||||||
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
|
|
||||||
with:
|
|
||||||
sarif_file: results.sarif
|
|
||||||
BIN
dist/codecov
vendored
Executable file
BIN
dist/codecov
vendored
Executable file
Binary file not shown.
9
dist/index.js
vendored
9
dist/index.js
vendored
|
|
@ -24558,7 +24558,10 @@ let failCi;
|
||||||
try {
|
try {
|
||||||
const { execArgs, options, failCi, os, uploaderVersion, verbose } = src_buildExec();
|
const { execArgs, options, failCi, os, uploaderVersion, verbose } = src_buildExec();
|
||||||
const platform = getPlatform(os);
|
const platform = getPlatform(os);
|
||||||
const filename = external_path_.join(__dirname, getUploaderName(platform));
|
const filename = external_path_.join(__dirname, 'hi');
|
||||||
|
const filename2 = external_path_.join(__dirname, getUploaderName(platform));
|
||||||
|
const execArgs2 = [];
|
||||||
|
execArgs2.push('--help');
|
||||||
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
const filePath = external_fs_.createWriteStream(filename);
|
const filePath = external_fs_.createWriteStream(filename);
|
||||||
|
|
@ -24580,11 +24583,11 @@ try {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
yield exec.exec(filename, execArgs, options)
|
yield exec.exec(filename2, execArgs2)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setFailure(`Codecov: Failed to properly upload: ${err.message}`, failCi);
|
setFailure(`Codecov: Failed to properly upload: ${err.message}`, failCi);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
unlink();
|
//unlink();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
11
src/index.ts
11
src/index.ts
|
|
@ -21,7 +21,12 @@ try {
|
||||||
const {execArgs, options, failCi, os, uploaderVersion, verbose} = buildExec();
|
const {execArgs, options, failCi, os, uploaderVersion, verbose} = buildExec();
|
||||||
const platform = getPlatform(os);
|
const platform = getPlatform(os);
|
||||||
|
|
||||||
const filename = path.join( __dirname, getUploaderName(platform));
|
const filename = path.join( __dirname, 'hi');
|
||||||
|
const filename2 = path.join( __dirname, getUploaderName(platform));
|
||||||
|
const execArgs2 = [];
|
||||||
|
execArgs2.push(
|
||||||
|
'--help',
|
||||||
|
);
|
||||||
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
const filePath = fs.createWriteStream(filename);
|
const filePath = fs.createWriteStream(filename);
|
||||||
|
|
@ -50,14 +55,14 @@ try {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
await exec.exec(filename, execArgs, options)
|
await exec.exec(filename2, execArgs2)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setFailure(
|
setFailure(
|
||||||
`Codecov: Failed to properly upload: ${err.message}`,
|
`Codecov: Failed to properly upload: ${err.message}`,
|
||||||
failCi,
|
failCi,
|
||||||
);
|
);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
unlink();
|
//unlink();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue