-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2798 from ohcnetwork/develop
Merge Develop To Staging
- Loading branch information
Showing
66 changed files
with
1,854 additions
and
467 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
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 |
---|---|---|
|
@@ -19,6 +19,9 @@ jobs: | |
with: | ||
python-version: "3.13" | ||
|
||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} | ||
- run: | | ||
python -m pip install pre-commit | ||
- run: | | ||
pre-commit run --show-diff-on-failure --color=always \ | ||
--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} |
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ on: | |
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-24.04-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -24,26 +25,37 @@ jobs: | |
id: cache-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ hashFiles('Pipfile.lock', 'docker/dev.Dockerfile') }} | ||
path: | | ||
${{ runner.temp }}/.buildx-cache | ||
${{ runner.temp }}/.buildx-mounted-cache | ||
key: ${{ runner.os }}-${{ runner.arch }}-buildx-dev-${{ hashFiles('Pipfile.lock', 'docker/dev.Dockerfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
${{ runner.os }}-${{ runner.arch }}-buildx-dev- | ||
- name: inject cache into docker | ||
uses: reproducible-containers/[email protected] | ||
with: | ||
cache-map: | | ||
{ | ||
"${{ runner.temp }}/.buildx-mounted-cache": "/root/.cache/pip" | ||
} | ||
skip-extraction: ${{ steps.cache-restore.outputs.cache-hit }} | ||
|
||
- name: Create new cache | ||
run: | | ||
mkdir -p /tmp/.buildx-cache | ||
mkdir -p /tmp/.buildx-cache-new | ||
mkdir -p ${{ runner.temp }}/.buildx-cache | ||
mkdir -p ${{ runner.temp }}/.buildx-cache-new | ||
mkdir -p ${{ runner.temp }}/.buildx-mounted-cache | ||
- name: Bake docker images | ||
uses: docker/bake-action@v5 | ||
with: | ||
load: true | ||
set: | | ||
*.cache-from=type=local,src=/tmp/.buildx-cache | ||
*.cache-to=type=local,dest=/tmp/.buildx-cache-new | ||
files: docker-compose.yaml,docker-compose.local.yaml | ||
env: | ||
DOCKER_BUILD_SUMMARY: false | ||
- name: Build images | ||
run: | | ||
docker buildx build \ | ||
--file docker/dev.Dockerfile \ | ||
--tag care_local \ | ||
--cache-from=type=local,src=${{ runner.temp }}/.buildx-cache \ | ||
--cache-to=type=local,dest=${{ runner.temp }}/.buildx-cache-new,mode=max \ | ||
--platform linux/arm64 \ | ||
. | ||
- name: Start services | ||
run: | | ||
|
@@ -56,7 +68,7 @@ jobs: | |
-f docker-compose.local.yaml \ | ||
logs | ||
- name: Check migrations | ||
- name: Check missing migrations | ||
run: make checkmigration | ||
|
||
- name: Validate integrity of fixtures | ||
|
@@ -74,24 +86,30 @@ jobs: | |
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Move new cache | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
rm -rf ${{ runner.temp }}/.buildx-cache | ||
mv ${{ runner.temp }}/.buildx-cache-new ${{ runner.temp }}/.buildx-cache | ||
- name: Save Docker layers cache | ||
if: ${{ inputs.event_name == 'push' || github.event_name == 'push' }} | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' && steps.cache-restore.outputs.cache-hit != 'true' }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ hashFiles('Pipfile.lock', 'docker/dev.Dockerfile') }} | ||
path: | | ||
${{ runner.temp }}/.buildx-cache | ||
${{ runner.temp }}/.buildx-mounted-cache | ||
key: ${{ runner.os }}-${{ runner.arch }}-buildx-dev-${{ hashFiles('Pipfile.lock', 'docker/dev.Dockerfile') }} | ||
|
||
# Upload dummy db as artifact so it can be used to speed up frontend tests | ||
- name: Dump db | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} | ||
run: make dump-db | ||
|
||
- name: Upload db artifact | ||
if: ${{ inputs.event_name == 'push' || github.event_name == 'push' }} | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: care-db-dump | ||
path: care_db.dump | ||
retention-days: 30 | ||
compression-level: 0 # file is already compressed | ||
overwrite: true # keep only the last artifact |
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
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
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
Oops, something went wrong.