diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 4a23647801..0f7123e748 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -9,16 +9,15 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: CodeQL -on: - push: - branches: [ "v3" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "v3" ] - schedule: - - cron: '37 9 * * 5' +on: [push, pull_request] + +concurrency: + # Cancel a currently running workflow from the same PR, branch or tag when a + # new workflow is triggered. + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: analyze: @@ -32,8 +31,8 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp', 'javascript', 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + language: [ "cpp", "javascript", "python" ] + # CodeQL supports [ "cpp", "csharp", "go", "java", "javascript", "python", "ruby" ] # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support env: diff --git a/.github/workflows/mediasoup-node.yaml b/.github/workflows/mediasoup-node.yaml index fcb8fdb946..9e14f5c3bf 100644 --- a/.github/workflows/mediasoup-node.yaml +++ b/.github/workflows/mediasoup-node.yaml @@ -12,6 +12,7 @@ jobs: ci: strategy: matrix: + fail-fast: true ci: - os: ubuntu-20.04 node: 16 @@ -27,7 +28,7 @@ jobs: runs-on: ${{ matrix.ci.os }} env: - MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' + MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: "true" steps: - name: Checkout @@ -43,7 +44,7 @@ jobs: with: path: | ~/.npm - key: ${{ matrix.ci.os }}-node-${{ hashFiles('**/package.json') }} + key: ${{ matrix.ci.os }}-node-${{ hashFiles("**/package.json") }} restore-keys: | ${{ matrix.ci.os }}-node- diff --git a/.github/workflows/mediasoup-rust.yaml b/.github/workflows/mediasoup-rust.yaml index ef5e95eaa6..ba4b6cea7d 100644 --- a/.github/workflows/mediasoup-rust.yaml +++ b/.github/workflows/mediasoup-rust.yaml @@ -14,6 +14,7 @@ env: jobs: ci: strategy: + fail-fast: true matrix: os: - ubuntu-20.04 @@ -24,7 +25,7 @@ jobs: runs-on: ${{ matrix.os }} env: - KEEP_BUILD_ARTIFACTS: '1' + KEEP_BUILD_ARTIFACTS: "1" steps: - name: Checkout @@ -36,7 +37,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git - key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ matrix.os }}-cargo-${{ hashFiles("**/Cargo.toml") }} - name: cargo fmt run: cargo fmt --all -- --check @@ -50,6 +51,6 @@ jobs: - name: cargo doc run: cargo doc --locked --all --no-deps --lib env: - DOCS_RS: '1' - RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links' + DOCS_RS: "1" + RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" diff --git a/.github/workflows/mediasoup-worker-prebuild.yaml b/.github/workflows/mediasoup-worker-prebuild.yaml index d0d8ba6da7..ee046519c2 100644 --- a/.github/workflows/mediasoup-worker-prebuild.yaml +++ b/.github/workflows/mediasoup-worker-prebuild.yaml @@ -17,7 +17,7 @@ on: jobs: ci: strategy: - fail-fast: false + fail-fast: true matrix: build: # For Linux let's use an old version of Ubuntu (20.04) that builds the @@ -46,36 +46,36 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") - name: Node.js uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") # We need to install some NPM production deps for npm-scripts.mjs to work. - name: npm ci --ignore-scripts run: npm ci --ignore-scripts --omit=dev --foreground-scripts - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") # However we also need to install pip invoke manually (since # `--ignore-scripts` prevented invoke from being installed). - name: pip3 install invoke run: pip3 install invoke - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") - name: npm run worker:build run: npm run worker:build - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") # Publish prebuild binaries on tag. - name: npm run worker:prebuild run: npm run worker:prebuild - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") - name: Upload mediasoup-worker prebuilt binary uses: softprops/action-gh-release@v1 with: files: worker/prebuild/mediasoup-worker-*.tgz - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, "refs/tags/") diff --git a/.github/workflows/mediasoup-worker.yaml b/.github/workflows/mediasoup-worker.yaml index 4ade2574c5..6028c6b8a2 100644 --- a/.github/workflows/mediasoup-worker.yaml +++ b/.github/workflows/mediasoup-worker.yaml @@ -11,7 +11,7 @@ concurrency: jobs: ci: strategy: - fail-fast: false + fail-fast: true matrix: build: - os: ubuntu-20.04 @@ -44,7 +44,7 @@ jobs: env: CC: ${{ matrix.build.cc }} CXX: ${{ matrix.build.cxx }} - MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' + MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: "true" steps: - name: Checkout @@ -60,7 +60,7 @@ jobs: with: path: | ~/.npm - key: ${{ matrix.build.os }}-node-${{matrix.build.cc}}-${{ hashFiles('**/package.json') }} + key: ${{ matrix.build.os }}-node-${{matrix.build.cc}}-${{ hashFiles("**/package.json") }} restore-keys: | ${{ matrix.build.os }}-node-${{matrix.build.cc}}- @@ -72,12 +72,12 @@ jobs: - name: npm ci --prefix worker/scripts run: npm ci --prefix worker/scripts --foreground-scripts # TODO: Maybe fix this one day. - if: runner.os != 'Windows' + if: runner.os != "Windows" - name: invoke -r worker lint run: invoke -r worker lint # TODO: Maybe fix this one day. - if: runner.os != 'Windows' + if: runner.os != "Windows" - name: invoke -r worker mediasoup-worker run: invoke -r worker mediasoup-worker @@ -85,4 +85,4 @@ jobs: - name: invoke -r worker test run: invoke -r worker test # TODO: Maybe fix this one day. - if: runner.os != 'Windows' + if: runner.os != "Windows"