-
Notifications
You must be signed in to change notification settings - Fork 61
Coss 5.2.1 actions #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-5.2.1
Are you sure you want to change the base?
Changes from all commits
834abbf
dd57bfc
4426d19
c98005f
3be6c15
0511207
24da315
f5b472a
42cb649
f4499a6
6cef1d7
e8370a7
d0893f8
99177a7
381b160
40a25d6
bc47b6e
5f56c57
c07d1fa
f1142d8
7074fd6
6fbcf5c
4478c6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // this plugin is used to make all rules default to warnings | ||
| require('eslint-plugin-only-warn'); | ||
|
|
||
| module.exports = { | ||
| extends: 'standard', | ||
| plugins: ['only-warn'], // makes all rules default to warnings | ||
| ignorePatterns: ['gulpfile.js', 'webpack.config.js', 'app/bower_components/**'], | ||
| globals: { | ||
| org: true, | ||
| CryptoJS: true, | ||
| _: true, | ||
| $: true, | ||
| angular: true, | ||
| ecEditor: true, | ||
| EkTelemetry: true, | ||
| EkstepEditor: true, | ||
| EkstepEditorAPI: true, | ||
| Class: true, | ||
| UUID: true, | ||
| WebFontConfig: true, | ||
| TextWYSIWYG: true, | ||
| ManifestGenerator: true, | ||
| WebFont: true, | ||
| fabric: true, | ||
| ServiceConstants: true, | ||
| async: true, | ||
| Fingerprint2: true, | ||
| describe: true, | ||
| jasmine: true, | ||
| afterAll: true, | ||
| beforeAll: true, | ||
| it: true, | ||
| spyOn: true, | ||
| expect: true, | ||
| xit: true, | ||
| EventBus: true, | ||
| beforeEach: true, | ||
| canvas: true, | ||
| Plugin: true, | ||
| createjs: true, | ||
| p: true, | ||
| basePlugin: true, | ||
| Mousetrap: true, | ||
| afterEach: true, | ||
| location: true, | ||
| X2JS: true | ||
| }, | ||
| rules: { | ||
| indent: [2, 'tab'], | ||
| 'no-tabs': 0, | ||
| 'no-throw-literal': 'error', | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| name: Publish Sunbird-generic-editor to blob | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - '*' | ||
|
|
||
| env: | ||
| NODE_VERSION: 10.24.1 | ||
| version_number: ${{ github.ref_name }} | ||
| build_number: ${{ github.run_number }} | ||
| CLOUD_PROVIDER: ${{ vars.CLOUD_PROVIDER }} | ||
| GCP_BUCKET: ${{ vars.GCP_BUCKET }} | ||
| AZURE_CONTAINER: ${{ vars.AZURE_CONTAINER }} | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: node_modules | ||
| key: ${{ runner.os }}-node-${{ hashFiles('package.json') }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| registry-url: 'https://registry.npmjs.org/' | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential libpng-dev | ||
|
|
||
| - name: Clone content plugins | ||
| run: | | ||
| git clone https://github.com/sanketika-labs/sunbird-content-plugins.git plugins -b ${{ github.ref_name }} | ||
|
|
||
| - name: Install global dependencies | ||
| run: | | ||
| npm install -g [email protected] [email protected] [email protected] | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install --legacy-peer-deps | ||
| env: | ||
| PHANTOMJS_PLATFORM: linux | ||
| PHANTOMJS_ARCH: x64 | ||
| TMPDIR: /tmp | ||
|
|
||
| - name: Install bower dependencies | ||
| working-directory: app | ||
| run: | | ||
| bower cache clean --allow-root | ||
| bower install --force --allow-root | ||
|
|
||
| - name: Build and package | ||
| run: | | ||
| npm install gulp-gzip --save-dev | ||
| npm run build-npm-pkg | ||
|
|
||
| - name: Setup Google Cloud SDK | ||
| if: env.CLOUD_PROVIDER == 'gcp' | ||
| uses: google-github-actions/setup-gcloud@v1 | ||
| with: | ||
| install_components: 'gsutil' | ||
|
|
||
| - name: Authenticate and Upload to Google Cloud Storage | ||
| if: env.CLOUD_PROVIDER == 'gcp' | ||
| run: | | ||
| echo "${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}" | base64 -d > /tmp/service-account-key.json | ||
| gcloud auth activate-service-account --key-file=/tmp/service-account-key.json | ||
| gsutil -m cp -r generic-editor/* gs://${{ env.GCP_BUCKET }}/generic-editor/ | ||
| rm -f /tmp/service-account-key.json | ||
|
|
||
| - name: Upload to Azure Blob Storage | ||
| if: env.CLOUD_PROVIDER == 'azure' | ||
| uses: azure/CLI@v1 | ||
| with: | ||
| azcliversion: latest | ||
| inlineScript: | | ||
| az storage blob upload-batch \ | ||
| --account-name "${{ secrets.AZURE_STORAGE_ACCOUNT }}" \ | ||
| --account-key "${{ secrets.AZURE_STORAGE_KEY }}" \ | ||
| --destination "${{ vars.AZURE_CONTAINER }}/generic-editor" \ | ||
| --source generic-editor \ | ||
| --overwrite | ||
|
|
||
| # Note: Publishing to AWS S3 is not tested. | ||
|
|
||
| # - name: Configure AWS credentials | ||
| # if: env.CLOUD_PROVIDER == 'aws' | ||
| # uses: aws-actions/configure-aws-credentials@v4 | ||
| # with: | ||
| # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| # aws-region: ${{ vars.AWS_REGION || 'us-east-1' }} | ||
|
|
||
| # - name: Upload to Amazon S3 | ||
| # if: env.CLOUD_PROVIDER == 'aws' | ||
| # env: | ||
| # S3_BUCKET: ${{ vars.S3_BUCKET }} | ||
| # run: | | ||
| # aws s3 sync generic-editor s3://${{ env.S3_BUCKET }}/generic-editor/ | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,101 @@ | ||||||||||
| name: Build and Test on Pull Request | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| pull_request: | ||||||||||
| branches: | ||||||||||
| - '**' | ||||||||||
|
|
||||||||||
| env: | ||||||||||
| CONTENT_PLUGIN_VERSION: ${{ vars.CONTENT_PLUGIN_VERSION || 'release-8.0.0' }} | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| build-test: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| env: | ||||||||||
| version_number: ${{ github.ref_name }} | ||||||||||
| build_number: ${{ github.run_number }} | ||||||||||
| steps: | ||||||||||
| - name: Checkout code | ||||||||||
| uses: actions/checkout@v3 | ||||||||||
|
|
||||||||||
| - name: Set up Node.js 10 | ||||||||||
| uses: actions/setup-node@v3 | ||||||||||
| with: | ||||||||||
| node-version: 10.24.1 | ||||||||||
|
|
||||||||||
| - name: Cache node modules | ||||||||||
| uses: actions/cache@v3 | ||||||||||
| with: | ||||||||||
| path: node_modules | ||||||||||
| key: ${{ runner.os }}-node-${{ hashFiles('package.json') }} | ||||||||||
|
|
||||||||||
| - name: Clone plugins (from fork) | ||||||||||
| run: | | ||||||||||
| git clone --branch ${{ env.CONTENT_PLUGIN_VERSION }} https://github.com/Sunbird-Knowlg/sunbird-content-plugins.git plugins | ||||||||||
|
|
||||||||||
| - name: Install dependencies | ||||||||||
| run: | | ||||||||||
| which bower || sudo npm install -g [email protected] | ||||||||||
| which grunt || sudo npm install -g [email protected] | ||||||||||
| which gulp || sudo npm install -g [email protected] | ||||||||||
| sudo apt-get install build-essential libpng-dev | ||||||||||
|
|
||||||||||
| - name: Bower cache clean | ||||||||||
| working-directory: app | ||||||||||
| run: bower cache clean --allow-root | ||||||||||
|
|
||||||||||
| - name: Bower install | ||||||||||
| working-directory: app | ||||||||||
| run: bower install --force --allow-root | ||||||||||
|
|
||||||||||
| - name: Install global npm packages | ||||||||||
| run: npm install --legacy-peer-deps | ||||||||||
|
|
||||||||||
| - name: Gulp packageCorePlugins | ||||||||||
| run: gulp packageCorePlugins | ||||||||||
|
|
||||||||||
| - name: Plugin build | ||||||||||
| run: npm run plugin-build | ||||||||||
|
|
||||||||||
| - name: Run build | ||||||||||
| run: npm run build | ||||||||||
|
|
||||||||||
| - name: Test | ||||||||||
| run: npm run test | ||||||||||
| continue-on-error: true | ||||||||||
|
||||||||||
| continue-on-error: true |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lint job depends on build-test but doesn't install dependencies. The cached node_modules from the build-test job won't be available since jobs run in separate environments.
| - name: Install dependencies | |
| run: npm install --legacy-peer-deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow assumes that every tag pushed to this repository has a corresponding branch with the same name in the sunbird-content-plugins repository, which may not always be true and could cause the workflow to fail.