Skip to content

Commit

Permalink
fix(ci): migrate to gha
Browse files Browse the repository at this point in the history
update docker
  • Loading branch information
duncdrum committed Dec 28, 2023
1 parent 4c9d59b commit 4352675
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This workflow builds a xar archive, deploys it into exist and execute a simple smoke test.
# It also includes code for using semantic-release to upload packages as part of GitHub releases
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# For node free automated release see https://trstringer.com/github-actions-create-release-upload-artifacts/

name: exist-db CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# 7.0.0-SNAPSHOT and 6.2.0 created
exist-version: [5.2.0, latest, release]
node-version: [18, 20]

steps:
# Checkout code
- uses: actions/checkout@v4

# Build
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

# Install
- run: npm ci

# Test
- name: Build default images for testing on CI
uses: docker/build-push-action@v5
with:
context: .
file: ./test/Dockerfile
build-args: EXIST_VER=${{ matrix.exist-version }}
load: true
tags: exist-vs

- name: Start exist-ci containers
run: |
docker run -dit -p 8080:8080 --name exist --rm exist-vs
sleep 10s
- name: Run test
run: npm test

# Lint commit messages
# - name: lint commit message
# uses: wagoid/commitlint-github-action@v5

# release:
# name: Release
# runs-on: ubuntu-latest
# needs: build
# if: github.ref == 'refs/heads/master'
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# cache: npm
# node-version: lts/*
# - name: Install dependencies
# run: npm ci --no-optional
# - name: Perform Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PUBLIC_REPO: ${{ secrets.PUBLIC_REPO }}
# run: npx semantic-release
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM existdb/existdb:5.0.0
ARG EXIST_VER=5.0.0

ADD https://github.com/eXist-db/atom-editor-support/releases/download/v1.0.0/atom-editor-1.0.0.xar /exist/autodeploy
FROM duncdrum/existdb:${EXIST_VER}

ADD https://github.com/eXist-db/atom-editor-support/releases/latest/download/atom-editor-1.1.0.xar /exist/autodeploy

0 comments on commit 4352675

Please sign in to comment.