Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Update #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Commit Workflow

on:
push:
workflow_dispatch:

jobs:
no-tty-in-ci:
name: Ensure no TTY if user does not need to input anything
runs-on: ubuntu-latest
env:
ARTIFACTS_REPOSITORY_USERNAME: ${{ secrets.ARTIFACTS_REPOSITORY_USERNAME }}
ARTIFACTS_REPOSITORY_PASSWORD: ${{ secrets.ARTIFACTS_REPOSITORY_PASSWORD }}
ANSIBLE_VAULT_PW: ${{ secrets.ANSIBLE_VAULT_PW }}
PLASMACTL_KEYRING_PASSWORD: ${{ secrets.PLASMACTL_KEYRING_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Commands
run: |
set -x
date
pwd
whoami
make deps build
ls -lah bin/launchr
mkdir -p .compose/build/
mkdir -p .compose/artifacts/
tar -czf .compose/artifacts/plasmactl-bump-xxx-plasma-src.tar.gz --exclude=plasmactl-bump-xxx-plasma-src.tar.gz .
./bin/launchr bump --sync --username "xxx" --password "xxx" --vault-pass "xxx" --keyring-passphrase "xxx" --override "xxx" -vvv

commands-ok:
name: Ensure main commands do not fail
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Commands
run: |
set -x
date
pwd
whoami
make deps build
ls -lah bin/launchr
mkdir -p interaction/softwares/roles/whatever/meta/
cat <<EOF > interaction/softwares/roles/whatever/meta/plasma.yaml
plasma:
author: Whoever
categories:
- kind.software
- machine
description: Whatever
license: MIT
version: 197d7ab84a2b4
EOF
touch interaction/softwares/roles/whatever/meta/whatever
cat interaction/softwares/roles/whatever/meta/whatever
git add -A
git config --global user.email "[email protected]"
git config --global user.name "CI testing"
git commit -m "CI testing"
./bin/launchr bump

go-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Commands
run: |
set -x
date
pwd
whoami
make lint

go-tests:
name: Run Go tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Commands
run: |
set -x
date
pwd
whoami
make test

2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Apache License


Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ endif
.PHONY: .lint
.lint:
$(info Running lint...)
$(GOLANGCI_BIN) run --fix ./...
$(GOLANGCI_BIN) run --fix --timeout 3m0s ./...
Loading