From 2b2980be578536b93e7e0e17841ae363ebfd77e8 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 2 Feb 2021 23:08:13 +0000 Subject: [PATCH] Move format and license checks to GH actions (#2154) --- .azure-pipelines-templates/checks.yml | 7 +------ .azure-pipelines-templates/matrix.yml | 9 ++++----- .github/workflows/ci-checks.yml | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci-checks.yml diff --git a/.azure-pipelines-templates/checks.yml b/.azure-pipelines-templates/checks.yml index f38e5b68a..451fa305a 100644 --- a/.azure-pipelines-templates/checks.yml +++ b/.azure-pipelines-templates/checks.yml @@ -1,6 +1,6 @@ jobs: - job: Checks - displayName: "Formatting, License and Lint Checks" + displayName: "Release notes check" ${{ insert }}: ${{ parameters.env }} @@ -9,10 +9,5 @@ jobs: clean: true fetchDepth: 1 - - script: ./scripts/ci-checks.sh - displayName: "Checks" - condition: succeededOrFailed() - - script: python3.8 scripts/extract-release-notes.py /dev/null displayName: "Check presence of release notes entry" - condition: eq('${{ parameters.perf_or_release }}', 'release') diff --git a/.azure-pipelines-templates/matrix.yml b/.azure-pipelines-templates/matrix.yml index f46f5b85d..b76b00074 100644 --- a/.azure-pipelines-templates/matrix.yml +++ b/.azure-pipelines-templates/matrix.yml @@ -40,11 +40,6 @@ parameters: ctest_args: '-L "zaptest"' jobs: - - template: checks.yml - parameters: - env: ${{ parameters.env.Hosted }} - perf_or_release: ${{ parameters.perf_or_release }} - # Debug - ${{ each target in parameters.target }}: - template: common.yml @@ -79,6 +74,10 @@ jobs: # Release - ${{ if eq(parameters.perf_or_release, 'release') }}: + - template: checks.yml + parameters: + env: ${{ parameters.env.Hosted }} + - template: common.yml parameters: target: SGX diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml new file mode 100644 index 000000000..de8ee930c --- /dev/null +++ b/.github/workflows/ci-checks.yml @@ -0,0 +1,18 @@ +name: "Format and License Checks" + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + checks: + runs-on: ubuntu-18.04 + container: ccfciteam/ccf-ci:oe0.13.0 + + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - run: ./scripts/ci-checks.sh