-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Francis Lavoie
committed
Nov 15, 2023
1 parent
532547a
commit ad931f2
Showing
7 changed files
with
172 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,16 @@ | ||
name: Build | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build_qa: | ||
name: Build QA Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Set the QA configuration file | ||
run: mv env-qa .env | ||
- name: Ensure we can build the image | ||
run: docker build -t test:test --target server . |
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,15 @@ | ||
name: Commit Lint Check | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Commit Lint Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Lint Commits | ||
uses: Ferlab-Ste-Justine/action-commit-lint@v2 |
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,36 @@ | ||
name: 'Quality' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
issues: write | ||
packages: write | ||
pull-requests: write | ||
repository-projects: write | ||
security-events: write | ||
statuses: write | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: ArtiomTr/jest-coverage-report-action@v2 | ||
id: coverage | ||
with: | ||
test-script: npm run coverage:changed | ||
output: report-markdown | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: PR Coverage | ||
message: ${{ steps.coverage.outputs.report }} |
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,24 @@ | ||
name: Publish Image Using Commit Hash | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish_qa: | ||
name: Publish QA Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Set the QA configuration file | ||
run: mv env-qa .env | ||
- name: Push the image on the docker registry | ||
uses: Ferlab-Ste-Justine/action-push-image@v2 | ||
with: | ||
username: ${{ secrets.FERLAB_DOCKER_HUB_USER }} | ||
password: ${{ secrets.FERLAB_DOCKER_HUB_TOKEN }} | ||
image: ferlabcrsj/clin-portal-ui | ||
tag_format: "qa-{sha}-{timestamp}" |
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,40 @@ | ||
name: Publish Image Using Semver Tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build_staging: | ||
name: Publish Staging Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Set the Staging configuration file | ||
run: mv env-staging .env | ||
- name: Push the image on the docker registry | ||
uses: Ferlab-Ste-Justine/action-push-image@v2 | ||
with: | ||
username: ${{ secrets.FERLAB_DOCKER_HUB_USER }} | ||
password: ${{ secrets.FERLAB_DOCKER_HUB_TOKEN }} | ||
image: ferlabcrsj/clin-portal-ui | ||
tag_format: "staging-{semver}" | ||
build_prod: | ||
name: Publish Prod Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Set the Prod configuration file | ||
run: mv env-prod .env | ||
- name: Push the image on the docker registry | ||
uses: Ferlab-Ste-Justine/action-push-image@v2 | ||
with: | ||
username: ${{ secrets.FERLAB_DOCKER_HUB_USER }} | ||
password: ${{ secrets.FERLAB_DOCKER_HUB_TOKEN }} | ||
image: ferlabcrsj/clin-portal-ui | ||
tag_format: "prod-{semver}" |
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,40 @@ | ||
name: 'Quality' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
issues: write | ||
packages: write | ||
pull-requests: write | ||
repository-projects: write | ||
security-events: write | ||
statuses: write | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install modules | ||
run: npm i | ||
- name: Run tests | ||
id: tests | ||
run: | | ||
echo " " >> results.log | ||
echo "## Project Coverage and Test" >> results.log | ||
echo "" >> results.log | ||
echo "`npm run test:github 2>&1 | sed 's/=//g' | tail -n 11`" >> results.log | ||
echo " " >> results.log | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: Project Coverage and Test | ||
path: results.log |
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