Skip to content

Commit

Permalink
chore: fix github-actions (#194)
Browse files Browse the repository at this point in the history
* chore: upgrade github-actions

* chore: fix node-versions

* chore: upgrade actions setup-js

* chore: upgrade stryker dependency
  • Loading branch information
codekie authored Nov 20, 2024
1 parent da86002 commit 10fb1f4
Show file tree
Hide file tree
Showing 5 changed files with 1,514 additions and 1,568 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ runs:
using: "composite"
steps:
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
- id: restore-cached-dependencies
name: Restore cached dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ./node_modules/
key: ${{ runner.os }}-install-${{ inputs.node-version }}-${{ hashFiles('**/package-lock.json') }}
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/test-and-deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x, 24.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare NodeJS environment
uses: ./.github/actions/setup-js
with:
Expand All @@ -26,17 +26,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x, 24.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare NodeJS environment
uses: ./.github/actions/setup-js
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: npm run build
- name: Create build-artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.node-version }}
path: ./dist/
Expand All @@ -47,17 +47,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x, 24.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare NodeJS environment
uses: ./.github/actions/setup-js
with:
node-version: ${{ matrix.node-version }}
- name: Build and run tests with coverage
run: npm run coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
Expand All @@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Push coverage to coveralls
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
Expand All @@ -78,17 +78,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x, 24.x]
node-version: [18.x, 20.x, 22.x]
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare NodeJS environment
uses: ./.github/actions/setup-js
with:
node-version: ${{ matrix.node-version }}
- name: Download build-artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.node-version }}
path: ./dist/
Expand All @@ -104,11 +104,11 @@ jobs:
steps:
# An explicit checkout is required, due to the `file`- and `context`-option, in the "Build and export to Docker"
# See: https://github.com/docker/build-push-action/issues/51#issuecomment-724662235
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Build and export to Docker
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
load: true
Expand All @@ -117,7 +117,7 @@ jobs:
outputs: type=docker,dest=${{ env.PATH_IMAGE_ARTIFACT }}
# Upload docker-image as artifact, so it can be used in succeeding jobs
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: myimage
path: ${{ env.PATH_IMAGE_ARTIFACT }}
Expand All @@ -130,7 +130,7 @@ jobs:
steps:
# Get the docker-image from the artifacts and load it
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: myimage
path: /tmp
Expand All @@ -150,10 +150,10 @@ jobs:
steps:
# An explicit checkout is required, due to the `file`- and `context`-option, in the "Build and export to Docker"
# See: https://github.com/docker/build-push-action/issues/51#issuecomment-724662235
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Get the docker-image from the artifacts and load it (as cache for the builds)
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: myimage
path: /tmp
Expand All @@ -164,7 +164,7 @@ jobs:
# Prepare tags, based on the metadata of the git reference
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_IMAGE }}
# generate Docker tags based on the following events/attributes
Expand All @@ -173,17 +173,17 @@ jobs:
type=semver,pattern={{major}}
# Log in to DockerHub
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Prepare Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
# Push, based on tags
- name: Build and push for tags
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.PATH_DOCKERFILE }}
Expand All @@ -193,7 +193,7 @@ jobs:
# Push `latest`, based on pushes on the default-branch
- name: Build and push for "latest"
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.PATH_DOCKERFILE }}
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ node_js:
- "18"
- "20"
- "22"
- "24"
- "node"

before_script:
Expand Down
Loading

0 comments on commit 10fb1f4

Please sign in to comment.