Skip to content

Commit

Permalink
Moved the repository to athenz org (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
WindzCUHK committed Nov 14, 2022
2 parents 8c1ba38 + 16eee5a commit 78de9da
Show file tree
Hide file tree
Showing 38 changed files with 343 additions and 870 deletions.
161 changes: 0 additions & 161 deletions .circleci/config.yml

This file was deleted.

14 changes: 6 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ _description_with_details_and_reasoning_

### Flags

- [ ] breaks backward compatibility
- [ ] requires a documentation update
- [ ] has untestable code
- [ ] Breaks backward compatibility
- [ ] Requires a documentation update
- [ ] Has untestable code

## Related issue/PR

**Delete if not applicable**
**Delete this section if there are no issues or pull requests that relate to this pull request.**
- Fixes #_issue_
- Closes #_PR_

Expand All @@ -26,15 +26,13 @@ _description_with_details_and_reasoning_
## Checklist

- [ ] Followed the guidelines in the CONTRIBUTING document
- [ ] Added prefix `[major]`/`[minor]`/`[patch]`/`[skip]` in the PR title
- [ ] Added prefix `[skip ci]`/`[ci skip]`/`[no ci]`/`[skip actions]`/`[actions skip]` in the PR title if necessary
- [ ] Tested and linted the code
- [ ] Commented the code
- [ ] Made corresponding changes to the documentation
- [ ] Confirmed no dropping in test coverage (by [Codecov](https://codecov.io/gh/yahoojapan/athenz-authorizer/pulls))
- [ ] Passed all pipeline checking
- [ ] Approved by >1 reviewer

## Checklist for maintainer
- [ ] Use `Squash and merge`
- [ ] Double-confirm the merge message has prefix `[major]`/`[minor]`/`[patch]`/`[skip]`
- [ ] Double-confirm the merge message has prefix `[skip ci]`/`[ci skip]`/`[no ci]`/`[skip actions]`/`[actions skip]`
- [ ] Delete the branch after merge
17 changes: 17 additions & 0 deletions .github/workflows/github-releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Github Releases

on:
push:
# Publish semver tags as releases.
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
90 changes: 90 additions & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Go test

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
schedule:
- cron: '0 10 * * *'
# If any commit message in your push or the HEAD commit of your PR contains the strings
# [skip ci], [ci skip], [no ci], [skip actions], or [actions skip]
# workflows triggered on the push or pull_request events will be skipped.
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
push:
branches: [ master ]
# Publish semver tags as releases.
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
# If any commit message in your push or the HEAD commit of your PR contains the strings
# [skip ci], [ci skip], [no ci], [skip actions], or [actions skip]
# workflows triggered on the push or pull_request events will be skipped.
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
pull_request:
branches: [ master ]

env:
GOLANG_VERSION: ^1.18

jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
discussions: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none

steps:
# This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
# https://github.com/actions/checkout
-
name: Checkout repository
id: checkout
# You may pin to the exact commit or the version.
# uses: https://github.com/actions/checkout/tags
uses: actions/checkout@v3

# This action sets up a go environment for use in actions by:
# - Optionally downloading and caching a version of Go by version and adding to PATH.
# - Registering problem matchers for error output.
# https://github.com/actions/setup-go
-
name: Setup Golang
id: setup-go
# You may pin to the exact commit or the version.
# uses: https://github.com/actions/setup-go/tags
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}

# This action allows caching dependencies and build outputs to improve workflow execution time.
# https://github.com/actions/cache
-
name: Cache Go Modules
id: cache-go
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# A GitHub Action for golang tests
-
name: Golang Tests
id: go-tests
run: |
go version
rm -rf example
go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Athenz Community Code of Conduct

Athenz follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
16 changes: 3 additions & 13 deletions policy/CONTRIBUTING.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,12 @@ make test
- If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment.
- Add tests relevant to the fixed bug or new feature.
- Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
- Add prefix `[major]`, `[minor]`, `[patch]` or `[skip]` in the PR title for releasing.
- Please use `Squash and merge` to merge a PR and double-confirm the merging message.
- Merging PR to master will increase the version no. and create a new release automatically.
- The new version no. depends on the commit message prefix when new PRs is merged to master branch.
- Commit message prefix and release tag reference table:
| **Commit Msg Prefix** | **New Version No.** | **Release `latest` Tag** | **Release `nightly` Tag** |
|:---------------------:|:--------------------:|:------------------------:|:-------------------------:|
| `[major] *` | `v1.2.3` => `v2.0.0` |||
| `[minor] *` | `v1.2.3` => `v1.3.0` |||
| `[patch] *` | `v1.2.3` => `v1.2.4` |||
| `[skip] *` ||||
- Other prefixes will cause the pipeline to **FAIL**❌.
- Please use `Squash and merge` to merge a PR.
- Create a git tag to make a release. Docker image with the `latest` tag will also be updated.

## Dependency management

The Athenz authorizer project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.14 or greater installed.
The Athenz authorizer project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.18 or greater installed.

To add or update a new dependency, use the `go get` command:

Expand Down
Loading

0 comments on commit 78de9da

Please sign in to comment.