chore: rename trustification references to guacsec #581
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Pull request build | |
on: | |
pull_request: | |
branches: | |
- main | |
- 'release/*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Lint and test project | |
strategy: | |
matrix: | |
node: ['18', 'latest'] | |
env: | |
MAIN_NODE_VER: '18' | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
registry-url: 'https://npm.pkg.github.com' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create .npmrc | |
run: | | |
echo "@guacsec:registry=https://npm.pkg.github.com" >> .npmrc | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Prepare Yarn | |
run: corepack prepare [email protected] --activate | |
- name: Prepare PNPM | |
run: corepack prepare pnpm@latest --activate | |
- name: Setup Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: maven | |
- name: setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
- name: get Python location | |
id: python-location | |
run: | | |
echo "python-bin-location=$(echo $pythonLocation)/bin" >> $GITHUB_OUTPUT | |
- name: setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20.1' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Setup syft | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: anchore/syft | |
platform: linux | |
arch: amd64 | |
# tag: the latest one, so we can catch changes | |
- name: Setup skopeo | |
run: sudo apt update && sudo apt-get -y install skopeo | |
- name: Install project modules | |
run: npm ci | |
- name: Lint source files | |
run: npm run lint | |
- name: Run unit tests | |
env: | |
EXHORT_PYTHON3_PATH: "${{steps.python-location.outputs.python-bin-location}}/python3" | |
EXHORT_PIP3_PATH: "${{steps.python-location.outputs.python-bin-location}}/pip3" | |
run: npm run test | |
- name: Compile project | |
run: npm run compile | |
- name: Run integration tests | |
run: npm run integration-tests | |
- name: Run integration tests cli | |
working-directory: integration | |
run: bash ./run_its.sh | |
- name: Upload coverage reports | |
if: ${{ matrix.node == env.MAIN_NODE_VER }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: ./coverage/coverage-final.json |