mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
ci: update all github actions (#4153)
* ci: update all github actions setup npm cache on all workflows * run full linting on master
This commit is contained in:
parent
a2441b8e3f
commit
2970cbe401
27
.github/workflows/ci-master.yml
vendored
27
.github/workflows/ci-master.yml
vendored
|
@ -16,17 +16,22 @@ jobs:
|
||||||
node-version: [14.x, 16.x]
|
node-version: [14.x, 16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: npm install, build, and test
|
cache: 'npm'
|
||||||
run: |
|
|
||||||
npm install -g npm@latest
|
- name: Install npm and dependencies
|
||||||
npm install
|
run: npm install -g npm@latest && npm install
|
||||||
npm run build --if-present
|
|
||||||
npm test
|
- name: Build
|
||||||
npm run lint
|
run: npm run build --if-present
|
||||||
env:
|
|
||||||
CI: true
|
- name: Test
|
||||||
|
run: npm run test
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: npm run lint
|
||||||
|
|
12
.github/workflows/docker-base-image.yml
vendored
12
.github/workflows/docker-base-image.yml
vendored
|
@ -13,16 +13,20 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
14
.github/workflows/docker-images-nightly.yml
vendored
14
.github/workflows/docker-images-nightly.yml
vendored
|
@ -33,23 +33,28 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.inputs.repository || 'n8n-io/n8n' }}
|
repository: ${{ github.event.inputs.repository || 'n8n-io/n8n' }}
|
||||||
ref: ${{ github.event.inputs.branch || 'master' }}
|
ref: ${{ github.event.inputs.branch || 'master' }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Merge Master - optionally
|
- name: Merge Master - optionally
|
||||||
run: |
|
run: |
|
||||||
[[ "${{github.event.inputs.merge-master}}" == "true" ]] && git remote add upstream https://github.com/n8n-io/n8n.git -f; git merge upstream/master --allow-unrelated-histories || echo ""
|
[[ "${{github.event.inputs.merge-master}}" == "true" ]] && git remote add upstream https://github.com/n8n-io/n8n.git -f; git merge upstream/master --allow-unrelated-histories || echo ""
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -59,6 +64,7 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'nightly' }}
|
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'nightly' }}
|
||||||
no-cache: true
|
no-cache: true
|
||||||
|
|
||||||
- name: Call Success URL - optionally
|
- name: Call Success URL - optionally
|
||||||
run: |
|
run: |
|
||||||
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
|
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
|
||||||
|
|
14
.github/workflows/docker-images.yml
vendored
14
.github/workflows/docker-images.yml
vendored
|
@ -9,19 +9,24 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get the version
|
- name: Get the version
|
||||||
id: vars
|
id: vars
|
||||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:14})
|
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:14})
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -33,6 +38,7 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}
|
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/n8n:latest
|
${{ secrets.DOCKER_USERNAME }}/n8n:latest
|
||||||
|
|
||||||
- name: Build (debian)
|
- name: Build (debian)
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
17
.github/workflows/test-workflows.yml
vendored
17
.github/workflows/test-workflows.yml
vendored
|
@ -16,18 +16,22 @@ jobs:
|
||||||
node-version: [16.x]
|
node-version: [16.x]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: n8n
|
path: n8n
|
||||||
|
|
||||||
- name: Checkout workflows repo
|
- name: Checkout workflows repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: n8n-io/test-workflows
|
repository: n8n-io/test-workflows
|
||||||
path: test-workflows
|
path: test-workflows
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
sudo apt update -y
|
||||||
|
@ -35,25 +39,27 @@ jobs:
|
||||||
echo 'tzdata tzdata/Zones/Europe select Paris' | sudo debconf-set-selections
|
echo 'tzdata tzdata/Zones/Europe select Paris' | sudo debconf-set-selections
|
||||||
DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y graphicsmagick
|
DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y graphicsmagick
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: npm install and build
|
- name: npm install and build
|
||||||
run: |
|
run: |
|
||||||
cd n8n
|
cd n8n
|
||||||
npm install -g npm@latest
|
npm install -g npm@latest
|
||||||
npm install
|
npm install
|
||||||
npm run build --if-present
|
npm run build --if-present
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Import credentials
|
- name: Import credentials
|
||||||
run: n8n/packages/cli/bin/n8n import:credentials --input=test-workflows/credentials.json
|
run: n8n/packages/cli/bin/n8n import:credentials --input=test-workflows/credentials.json
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
N8N_ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
|
N8N_ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
|
||||||
|
|
||||||
- name: Import workflows
|
- name: Import workflows
|
||||||
run: n8n/packages/cli/bin/n8n import:workflow --separate --input=test-workflows/workflows
|
run: n8n/packages/cli/bin/n8n import:workflow --separate --input=test-workflows/workflows
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
N8N_ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
|
N8N_ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
|
||||||
|
|
||||||
- name: Copy static assets
|
- name: Copy static assets
|
||||||
run: |
|
run: |
|
||||||
cp n8n/assets/n8n-logo.png /tmp/n8n-logo.png
|
cp n8n/assets/n8n-logo.png /tmp/n8n-logo.png
|
||||||
|
@ -61,6 +67,7 @@ jobs:
|
||||||
cp n8n/node_modules/pdf-parse/test/data/05-versions-space.pdf /tmp/05-versions-space.pdf
|
cp n8n/node_modules/pdf-parse/test/data/05-versions-space.pdf /tmp/05-versions-space.pdf
|
||||||
cp n8n/node_modules/pdf-parse/test/data/04-valid.pdf /tmp/04-valid.pdf
|
cp n8n/node_modules/pdf-parse/test/data/04-valid.pdf /tmp/04-valid.pdf
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: n8n/packages/cli/bin/n8n executeBatch --shallow --ids=test-workflows/safeList.txt --shortOutput --concurrency=16 --compare=test-workflows/snapshots
|
run: n8n/packages/cli/bin/n8n executeBatch --shallow --ids=test-workflows/safeList.txt --shortOutput --concurrency=16 --compare=test-workflows/snapshots
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in a new issue