.gitlab-ci.yml 1.23 KB
Newer Older
Nigel Kukard's avatar
Nigel Kukard committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
# Stages we need to progress through
stages:
  - build
  - test
  - deploy


build_job:
  stage: build
  script:
  # Create environment
  - apt-get update
  - apt-get dist-upgrade -y
  # Create dirs we need
  - mkdir build
  # Build wiaflos source files
  - cat contrib/books/10-basic-GL.wiaflos > build/combined.wiaflos
  # Generate load files
  # Artifacts
  artifacts:
    expire_in: 1 day
    paths:
    - build/


test_job:
  stage: test
  script:
  # Create environment
  - apt-get update
  - apt-get dist-upgrade -y
  - apt-get install -y git sqlite3 libsoap-lite-perl libdatetime-perl libconfig-inifiles-perl libcache-fastmmap-perl libdbd-sqlite3-perl libtemplate-perl libcrypt-gpg-perl libmime-lite-perl
  # Pull in sub repos
  - ./update-git-modules
  # Configure
  - sed -e 's/DSN=DBI:mysql:database=wiaflos;host=localhost/DSN=DBI:SQLite:dbname=wiaflos.sqlite/' -i wiaflos-server.conf
  # Load database
  - awitpt/bin/convert-tsql sqlite database/schema.tsql > database/schema.sqlite
  - sqlite3 wiaflos.sqlite < database/schema.sqlite
  # Load data
41
  - export PERL5LIB="$PWD"
Nigel Kukard's avatar
Nigel Kukard committed
42
  - ./wiaflos-admin --config=wiaflos-server.conf --connect="local" --load-file build/combined.wiaflos
Nigel Kukard's avatar
Nigel Kukard committed
43 44 45 46 47 48 49
  # Artifacts
  artifacts:
    expire_in: 1 day
    paths:
    - build/