diff --git a/.github/workflows/automated-tests.yaml b/.github/workflows/automated-tests.yaml index 05ce5e455e..28957b000d 100644 --- a/.github/workflows/automated-tests.yaml +++ b/.github/workflows/automated-tests.yaml @@ -20,14 +20,14 @@ jobs: matrix: node-version: [14.x, 16.x, 18.x] steps: - - name: Checkout code + - name: "Checkout code" uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: "Use Node.js ${{ matrix.node-version }}" uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: "npm" - - name: Install dependencies and run tests + - name: "Install dependencies and run tests" run: | Xvfb :99 -screen 0 1024x768x16 & export DISPLAY=:99 diff --git a/.github/workflows/codecov-test-suites.yaml b/.github/workflows/codecov-test-suites.yaml index b46a4724c8..8cdcccbb7e 100644 --- a/.github/workflows/codecov-test-suites.yaml +++ b/.github/workflows/codecov-test-suites.yaml @@ -17,16 +17,16 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - name: Checkout code + - name: "Checkout code" uses: actions/checkout@v3 - - name: Install dependencies and run coverage + - name: "Install dependencies and run coverage" run: | Xvfb :99 -screen 0 1024x768x16 & export DISPLAY=:99 npm ci touch css/custom.css npm run test:coverage - - name: Upload coverage results to codecov + - name: "Upload coverage results to codecov" uses: codecov/codecov-action@v3 with: files: ./coverage/lcov.info diff --git a/.github/workflows/depsreview.yaml b/.github/workflows/depsreview.yaml index e7c5530b36..308f0017d0 100644 --- a/.github/workflows/depsreview.yaml +++ b/.github/workflows/depsreview.yaml @@ -1,4 +1,8 @@ -name: "Dependency Review" +# This workflow scans your pull requests for dependency changes, and will raise an error if any vulnerabilities or invalid licenses are being introduced. +# For more information see: https://github.com/actions/dependency-review-action + +name: "Review Dependencies" + on: [pull_request] permissions: diff --git a/.github/workflows/enforce-changelog.yaml b/.github/workflows/enforce-changelog.yaml deleted file mode 100644 index 9632ac2d29..0000000000 --- a/.github/workflows/enforce-changelog.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# This workflow enforces the update of a changelog file on every pull request -# For more information see: https://github.com/dangoslen/changelog-enforcer - -name: "Enforce Changelog" - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] - -jobs: - check: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Enforce changelog️ - uses: dangoslen/changelog-enforcer@v3 - with: - changeLogPath: "CHANGELOG.md" - skipLabels: "Skip Changelog" diff --git a/.github/workflows/enforce-pullrequest-rules.yaml b/.github/workflows/enforce-pullrequest-rules.yaml new file mode 100644 index 0000000000..22d9c212ea --- /dev/null +++ b/.github/workflows/enforce-pullrequest-rules.yaml @@ -0,0 +1,28 @@ +# This workflow enforces on every pull request: +# - the update of our CHANGELOG.md file, see: https://github.com/dangoslen/changelog-enforcer +# - that the PR is not based against master, taken from https://github.com/oppia/oppia-android/pull/2832/files + +name: "Enforce Pull-Request Rules" + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] + +jobs: + check: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: "Enforce changelog" + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: "CHANGELOG.md" + skipLabels: "Skip Changelog" + - name: "Enforce develop branch" + if: ${{ github.base_ref == 'master' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }} + run: | + echo "This PR is based against the master branch and not a release or hotfix." + echo "Please don't do this. Switch the branch to 'develop'." + exit 1 + env: + BASE_BRANCH: ${{ github.base_ref }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 67c0ae3be1..bad4aefc82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al - Added Yr as a weather provider - Added config options "ignoreXOriginHeader" and "ignoreContentSecurityPolicy" - Added thai language +- Added workflow rule to make sure PRs are based against develop ### Removed