This commit is contained in:
Dana 2023-03-16 16:02:24 +02:00
parent bb6f970126
commit 63bb20cf1f
No known key found for this signature in database
GPG key ID: CE3464681E428690
7 changed files with 53 additions and 175 deletions

View file

@ -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

View file

@ -33,41 +33,41 @@ jobs:
name: codecov-version
version: v0.1.0
verbose: true
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Run tests and collect coverage
run: npm run test
- name: Upload coverage to Codecov (script)
uses: ./
with:
files: ./coverage/script/coverage-final.json
flags: script,${{ matrix.os }}
name: codecov-script
verbose: true
- name: Upload coverage to Codecov (demo)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: demo,${{ matrix.os }}
name: codecov-demo
verbose: true
- name: Upload coverage to Codecov (version)
uses: ./
with:
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.1.0
verbose: true
# run:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [macos-latest, windows-latest, ubuntu-latest]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Install dependencies
# run: npm install
# - name: Lint
# run: npm run lint
# - name: Run tests and collect coverage
# run: npm run test
# - name: Upload coverage to Codecov (script)
# uses: ./
# with:
# files: ./coverage/script/coverage-final.json
# flags: script,${{ matrix.os }}
# name: codecov-script
# verbose: true
# - name: Upload coverage to Codecov (demo)
# uses: ./
# with:
# files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
# file: ./coverage/coverage-final.json
# flags: demo,${{ matrix.os }}
# name: codecov-demo
# verbose: true
# - name: Upload coverage to Codecov (version)
# uses: ./
# with:
# files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
# file: ./coverage/coverage-final.json
# flags: version,${{ matrix.os }}
# name: codecov-version
# version: v0.1.0_8880
# verbose: true

View file

@ -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

Binary file not shown.

9
dist/index.js vendored
View file

@ -24558,7 +24558,10 @@ let failCi;
try {
const { execArgs, options, failCi, os, uploaderVersion, verbose } = src_buildExec();
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) => {
// Image will be stored at this path
const filePath = external_fs_.createWriteStream(filename);
@ -24580,11 +24583,11 @@ try {
}
});
};
yield exec.exec(filename, execArgs, options)
yield exec.exec(filename2, execArgs2)
.catch((err) => {
setFailure(`Codecov: Failed to properly upload: ${err.message}`, failCi);
}).then(() => {
unlink();
//unlink();
});
}));
});

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -21,7 +21,12 @@ try {
const {execArgs, options, failCi, os, uploaderVersion, verbose} = buildExec();
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) => {
// Image will be stored at this path
const filePath = fs.createWriteStream(filename);
@ -50,14 +55,14 @@ try {
}
});
};
await exec.exec(filename, execArgs, options)
await exec.exec(filename2, execArgs2)
.catch((err) => {
setFailure(
`Codecov: Failed to properly upload: ${err.message}`,
failCi,
);
}).then(() => {
unlink();
//unlink();
});
});
});