diff --git a/.github/workflows/ci.yml b/.github/workflows/lint.yml similarity index 63% rename from .github/workflows/ci.yml rename to .github/workflows/lint.yml index cc6bbd0..05099bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/lint.yml @@ -1,29 +1,21 @@ -name: CI - +name: Lint on: [push, 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.26.3 + pip install yamllint==1.35.1 yamllint module.yml && yamllint test/*.yml - - name: cfn-lint run: | - pip install cfn-lint==0.59.1 - cfn-lint -t module.yml && cfn-lint -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..ffd32ec --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test +on: [push, pull_request, workflow_dispatch] +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..1f26702 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "@cfn-modules/alerting", + "version": "1.2.2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@cfn-modules/alerting", + "version": "1.2.2", + "license": "Apache-2.0" + } + } +}