This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(ci): Update test pipeline (#7) * fix(ci): Fix broken test pipeline * ci: tagging pipeline (#9) * ci: tagging pipeline and dependencies * chore(release): 0.0.1 * [ci skip] chore(release): 0.0.2 * ci: created release and package release (#10) * [ci skip] chore(release): 0.0.3 * ci: coverage pipeline (#11) * chore: Development `docker-file` * chore(ci): Coverage pipeline * [ci skip] chore(release): 0.0.4 --------- Co-authored-by: Antonio <antoniojosedonishung@gmail.com>
- Loading branch information
1 parent
1da251d
commit c40b2ab
Showing
9 changed files
with
2,283 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Scala | ||
uses: olafurpg/setup-scala@v14 | ||
with: | ||
java-version: openjdk@1.11.0-2 | ||
|
||
- name: Set up docker environment | ||
run: docker compose up -d | ||
|
||
- name: Clean and test | ||
run: sbt clean coverage test coverageReport | ||
|
||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./target/scala-2.13/coverage-report/cobertura.xml | ||
fail_ci_if_error: true | ||
|
||
- name: Clean docker environment | ||
run: docker compose down --rmi all -v --remove-orphans |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
versioning: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.latest_version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: latest_version | ||
name: Latest version | ||
run: python version.py >> $GITHUB_OUTPUT | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
needs: | ||
- versioning | ||
outputs: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
steps: | ||
- name: Create Release | ||
id: create-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.versioning.outputs.version }} | ||
release_name: Release ${{ needs.versioning.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
|
||
build-docker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
needs: | ||
- versioning | ||
- create-release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Docker image | ||
run: echo "v${{ needs.versioning.outputs.version }}" | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ needs.versioning.outputs.version }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Tagging | ||
|
||
on: | ||
push: | ||
branches: ["dev"] | ||
|
||
jobs: | ||
tagging: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup node 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: "npm" | ||
- name: Git Identity | ||
run: | | ||
git checkout dev | ||
git fetch --all --tags | ||
git config --global user.email "antoniojosedonishung@gmail.com" | ||
git config --global user.name "Antonio Donis" | ||
- name: Changelog | ||
run: 'npx standard-version --message "[ci skip] chore(release): %s"' | ||
- name: Push changes | ||
run: git push --follow-tags --force origin dev |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,5 @@ build/ | |
|
||
### Mac OS ### | ||
.DS_Store | ||
|
||
node_modules |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
### 0.0.4 (2023-08-20) | ||
|
||
### 0.0.3 (2023-08-20) | ||
|
||
### 0.0.2 (2023-08-20) | ||
|
||
### 0.0.1 (2023-08-20) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **ci:** Update test pipeline ([#7](https://github.com/hawks-atlanta/metadata-scala/issues/7)) ([7e9080b](https://github.com/hawks-atlanta/metadata-scala/commit/7e9080bcf9d4ddd34a778aa30a67d74614988f32)) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '3.1' | ||
|
||
services: | ||
postgres-db: | ||
image: postgres:latest | ||
container_name: postgres-db | ||
restart: on-failure | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=metadata | ||
volumes: | ||
# - ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql | ||
- ./postgres-volume:/var/lib/postgresql/data | ||
|
||
postgres-admin: | ||
image: dpage/pgadmin4 | ||
container_name: postgres-admin | ||
ports: | ||
- "5050:80" | ||
environment: | ||
- PGADMIN_DEFAULT_EMAIL=postgres@postgres.com | ||
- PGADMIN_DEFAULT_PASSWORD=postgres | ||
depends_on: | ||
- postgres-db |
Oops, something went wrong.