-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ner-model
- Loading branch information
Showing
203 changed files
with
20,089 additions
and
4,626 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 |
---|---|---|
@@ -1,55 +1,41 @@ | ||
name: Continuous | ||
on: | ||
push: | ||
pull_request: | ||
merge_group: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
duplication-check: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
inPR: ${{ steps.check.outputs.number != '' }} | ||
steps: | ||
- name: Check if push is in PR | ||
id: check | ||
uses: 8BitJonny/[email protected] | ||
with: | ||
filterOutClosed: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
build-generic: | ||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | ||
name: "Continuous Image Build" | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
runs-on: ubuntu-latest | ||
needs: duplication-check | ||
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && needs.duplication-check.outputs.inPR == 'false' ) }} | ||
strategy: | ||
matrix: | ||
app: [ web, node ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3 | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: 'projects/${{ secrets.DEV_GKE_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github' | ||
service_account: '${{ secrets.DEV_GKE_SA }}' | ||
- name: Login to GCR | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: gcr.io | ||
username: oauth2accesstoken | ||
password: '${{ steps.auth.outputs.access_token }}' | ||
- name: Login to GAR | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: us-east1-docker.pkg.dev | ||
username: oauth2accesstoken | ||
|
@@ -73,7 +59,6 @@ jobs: | |
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
gcr.io/${{ secrets.DEV_PROJECT }}/sefaria-${{ matrix.app }}-${{ steps.branch-name.outputs.current_branch }} | ||
us-east1-docker.pkg.dev/${{ secrets.DEV_PROJECT }}/containers/sefaria-${{ matrix.app }}-${{ steps.branch-name.outputs.current_branch }} | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
|
@@ -95,38 +80,32 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-derived: | ||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | ||
name: "Continuous Image Build Stage 2" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
needs: | ||
- duplication-check | ||
- build-generic | ||
strategy: | ||
matrix: | ||
app: [ asset, linker ] | ||
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && needs.duplication-check.outputs.inPR == 'false' ) }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3 | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: 'projects/${{ secrets.DEV_GKE_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github' | ||
service_account: '${{ secrets.DEV_GKE_SA }}' | ||
- name: Login to GCR | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: gcr.io | ||
username: oauth2accesstoken | ||
password: '${{ steps.auth.outputs.access_token }}' | ||
- name: Login to GAR | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: us-east1-docker.pkg.dev | ||
username: oauth2accesstoken | ||
|
@@ -150,7 +129,6 @@ jobs: | |
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
gcr.io/${{ secrets.DEV_PROJECT }}/sefaria-${{ matrix.app }}-${{ steps.branch-name.outputs.current_branch }} | ||
us-east1-docker.pkg.dev/${{ secrets.DEV_PROJECT }}/containers/sefaria-${{ matrix.app }}-${{ steps.branch-name.outputs.current_branch }} | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
|
@@ -175,15 +153,15 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
####### | ||
# Below Tests only run on PR | ||
# Below Tests only run if PR is NOT draft | ||
####### | ||
jest-tests: | ||
name: "Jest" # This name is referenced when slacking status | ||
name: "Continuous Testing: Jest" # This name is referenced when slacking status | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'pull_request' }} | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
npm install | ||
|
@@ -196,21 +174,22 @@ jobs: | |
run: cat /home/runner/jestResults.json; STATUS=`jq ".numFailedTestSuites" /home/runner/jestResults.json`; exit $STATUS | ||
if: ${{ always() }} | ||
sandbox-deploy: | ||
name: "Continuous Testing: Sandbox Deploy" | ||
concurrency: | ||
group: dev-mongo | ||
cancel-in-progress: false | ||
if: ${{ github.event_name == 'pull_request' }} | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
needs: build-derived | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: 'projects/${{ secrets.DEV_GKE_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github' | ||
|
@@ -252,7 +231,7 @@ jobs: | |
PROJECT_ID: "${{ secrets.DEV_PROJECT }}" | ||
NAMESPACE: "${{secrets.DEV_SANDBOX_NAMESPACE}}" | ||
sandbox-ready: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
if: github.event.pull_request.draft == false | ||
needs: sandbox-deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -268,11 +247,11 @@ jobs: | |
WAIT_DURATION: "3000" | ||
GIT_COMMIT: "${{ steps.get-sha.outputs.sha_short }}" | ||
pytest-job: | ||
name: "Continuous Testing: PyTest" | ||
concurrency: | ||
group: dev-mongo | ||
cancel-in-progress: false | ||
if: ${{ github.event_name == 'pull_request' }} | ||
name: "PyTest" # This name is referenced when slacking status | ||
if: github.event.pull_request.draft == false | ||
needs: | ||
- sandbox-ready | ||
permissions: | ||
|
@@ -281,10 +260,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: 'projects/${{ secrets.DEV_GKE_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github' | ||
|
@@ -331,12 +310,13 @@ jobs: | |
run: kubectl delete jobs -l ci-run=$GITHUB_RUN_ID,test-name=pytest | ||
if: always() | ||
ending-notification: | ||
name: "Continuous Testing: Notifications" | ||
runs-on: ubuntu-latest | ||
if: ${{ always() && github.event_name == 'pull_request' }} | ||
if: ${{ always() && (github.event.pull_request.draft == false) }} | ||
needs: | ||
- pytest-job | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
@@ -350,8 +330,8 @@ jobs: | |
GITUSER_SLACK_MAP: ${{secrets.GITUSER_SLACK_MAP}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
sandbox-cleanup: | ||
name: "Clean up CI Sandbox" | ||
if: ${{ always() && github.event_name == 'pull_request' }} | ||
name: "Continuous Testing: Clean up" | ||
if: ${{ always() && (github.event.pull_request.draft == false) }} | ||
needs: | ||
- pytest-job | ||
runs-on: ubuntu-latest | ||
|
@@ -360,10 +340,10 @@ jobs: | |
id-token: 'write' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: 'projects/${{ secrets.DEV_GKE_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github' | ||
|
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 |
---|---|---|
|
@@ -51,9 +51,13 @@ jobs: | |
id: semantic | ||
with: | ||
working_directory: ./helm-chart | ||
semantic_version: 18.0.1 | ||
extra_plugins: | | ||
[email protected] | ||
@semantic-release/[email protected] | ||
[email protected] | ||
@semantic-release/[email protected] | ||
extends: | | ||
semantic-release-monorepo | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup | ||
|
Oops, something went wrong.