From e8c83addf1b9639cd734412055317bcfd70c9952 Mon Sep 17 00:00:00 2001 From: jean massip Date: Tue, 26 Sep 2023 21:27:56 +0200 Subject: [PATCH] add github actions --- .github/workflows/integration.yaml | 41 ++++++++++++++++++++++++++++ .github/workflows/integration.yml | 43 ------------------------------ .github/workflows/release.yml | 15 ----------- 3 files changed, 41 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/integration.yaml delete mode 100644 .github/workflows/integration.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml new file mode 100644 index 0000000..4d4ee50 --- /dev/null +++ b/.github/workflows/integration.yaml @@ -0,0 +1,41 @@ +name: Integration + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm i + - run: npm run build + unit-test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm i + - run: npm run test diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml deleted file mode 100644 index 5f29bc4..0000000 --- a/.github/workflows/integration.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Integration - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm i - - run: npm run build - unit-tests: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm i - - run: npm run test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f737fb1..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Release - -on: - push: - branches: [main] - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - run: docker build . -t laithharden/nest-app - - run: echo "${{secrets.DOCKER_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin - - run: docker push laithharden/nest-app