Skip to content

Add GitHub Actions to map the existing GitLab CI/CD config #14

Add GitHub Actions to map the existing GitLab CI/CD config

Add GitHub Actions to map the existing GitLab CI/CD config #14

Workflow file for this run

# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "CI"
on: [push, pull_request]
jobs:
build-dev-image:
runs-on: ubuntu-22.04
env:
IMAGE: build-image
IMAGE_TAG: "${{ github.sha }}"
BUILDIMAGE: "build-image:${{ github.sha }}"
steps:
- uses: actions/checkout@v4
- name: build-dev-image
run: make .build-image
- name: return-image-name
run: echo "image=${BUILDIMAGE}" >> "${GITHUB_OUTPUT}"
outputs:
image: ${{ steps.return-image-name.outputs.image }}
go-checks:
needs: build-dev-image
runs-on: ubuntu-22.04
container:
image: ${{needs.build-dev-image.outputs.image}}
steps:
- uses: actions/checkout@v4
- name: fmt
run: make assert-fmt
- name: vet
run: make vet
- name: lint
run: make lint
- name: ineffassign
run: make ineffassign
- name: misspell
run: make misspell
go-build:
needs: go-checks
runs-on: ubuntu-22.04
container:
image: ${{needs.build-dev-image.outputs.image}}
steps:
- uses: actions/checkout@v4
- name: build
run: make build
unit-tests:
needs: go-build
runs-on: ubuntu-22.04
container:
image: ${{needs.build-dev-image.outputs.image}}
steps:
- uses: actions/checkout@v4
- name: unit-tests
run: make test