Skip to content

Commit 0afefd2

Browse files
Created a basic ci/cd pipeline with github actions (#24)
Added a basic ci/cd pipeline for crossplane
1 parent 769cd51 commit 0afefd2

File tree

151 files changed

+37065
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+37065
-296
lines changed

.github/workflows/cicd.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v[0-9]+.[0-9]+.[0-9]+'
9+
pull_request:
10+
branches:
11+
- main
12+
types:
13+
- opened
14+
- reopened
15+
- synchronize
16+
17+
jobs:
18+
checks:
19+
name: Formatting and Linting
20+
runs-on: ubuntu-20.04
21+
steps:
22+
- name: Setup Golang Environment
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version: '1.15'
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
- name: Lint code
29+
run: |
30+
make init
31+
make fmt
32+
make lint
33+
34+
unit-tests:
35+
name: Unit Tests
36+
runs-on: ubuntu-20.04
37+
needs: checks
38+
steps:
39+
- name: Checkout Repository
40+
uses: actions/checkout@v3
41+
- name: Setup Golang Environment
42+
uses: actions/setup-go@v3
43+
- name: Run Tests
44+
run: make test
45+
- name: Upload coverage to Codecov
46+
uses: codecov/codecov-action@v3
47+
with:
48+
files: ./results/crossplane-go-coverage.out

.github/workflows/fossa.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Fossa
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.ref_name }}-fossa
10+
cancel-in-progress: true
11+
12+
jobs:
13+
14+
scan:
15+
name: Fossa
16+
runs-on: ubuntu-20.04
17+
if: ${{ github.event.repository.fork == false }}
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v3
21+
- name: Scan
22+
uses: fossas/fossa-action@v1
23+
with:
24+
api-key: ${{ secrets.FOSSA_TOKEN }}

.github/workflows/release.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions-ecosystem/action-get-latest-tag@v1
15+
id: get-latest-tag
16+
17+
- uses: actions-ecosystem/action-bump-semver@v1
18+
id: bump-semver
19+
with:
20+
current_version: ${{ steps.get-latest-tag.outputs.tag }}
21+
level: minor
22+
23+
- uses: actions-ecosystem/action-push-tag@v1
24+
with:
25+
tag: ${{ steps.bump-semver.outputs.new_version }}
26+
message: 'chore: version bump for ${{ steps.bump-semver.outputs.new_version }}'

CHANGELOG.md

-173
This file was deleted.

0 commit comments

Comments
 (0)