From 228b269605f1d1dcf3733cd91af828e81724b089 Mon Sep 17 00:00:00 2001 From: Andreas Wittig Date: Wed, 4 Dec 2024 10:57:32 +0100 Subject: [PATCH] Modernizing module --- .github/workflows/{ci.yml => lint.yml} | 23 ++++++++------------ .github/workflows/test.yml | 30 ++++++++++++++++++++++++++ package-lock.json | 13 +++++++++++ 3 files changed, 52 insertions(+), 14 deletions(-) rename .github/workflows/{ci.yml => lint.yml} (56%) create mode 100644 .github/workflows/test.yml create mode 100644 package-lock.json diff --git a/.github/workflows/ci.yml b/.github/workflows/lint.yml similarity index 56% rename from .github/workflows/ci.yml rename to .github/workflows/lint.yml index d1f7f7a..261ab52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/lint.yml @@ -1,29 +1,24 @@ -name: CI - -on: [push, pull_request] - +name: Lint +on: + push: + branches: [master] + pull_request: jobs: build: - runs-on: 'ubuntu-latest' - + runs-on: ['ubuntu-latest'] steps: - - uses: 'actions/checkout@v2' - - uses: 'actions/setup-python@v2' with: python-version: '3.8' - - name: yamlllint run: | - pip install yamllint==1.24.2 + pip install yamllint==1.35.1 yamllint module.yml && yamllint test/*.yml - - name: cfn-lint run: | - pip install cfn-lint==0.72.10 - cfn-lint -t module.yml && cd test/ && npm ci && cd - && cfn-lint -i W3002 -t test/*.yml - + pip install cfn-lint==1.20.1 + cfn-lint -i W3002 W1011 -t module.yml && cfn-lint -i W3002 W1011 -t test/*.yml - name: license run: | grep -q "LICENSE-2.0" module.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9e7fe70 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Test +on: + push: + branches: [master] + pull_request: +permissions: + id-token: write + contents: read +concurrency: + group: test + cancel-in-progress: false +jobs: + build: + runs-on: ['ubuntu-latest'] + steps: + - uses: 'actions/checkout@v2' + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: 'arn:aws:iam::068189904525:role/github-openid-connect' + aws-region: 'eu-west-1' + - uses: actions/setup-node@v4 + with: + node-version: '18.x' + - name: test + run: | + npm ci + cd test + npm ci + CFN_PACKAGE_BUCKET_NAME=cf-templates-1a2zmgbg9ut4o-eu-west-1 npm test + cd - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7f0e11a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "@cfn-modules/cloudfront", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@cfn-modules/cloudfront", + "version": "1.0.0", + "license": "Apache-2.0" + } + } +}