Skip to content

Commit

Permalink
First pass at CI configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Liang committed Nov 20, 2024
1 parent 584a132 commit ef9b8b6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 152 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ARG UBUNTU_VERSION=20.04

FROM ubuntu:${UBUNTU_VERSION} AS base

LABEL org.opencontainers.image.source=https://github.com/cfe-lab/gotoh
LABEL org.opencontainers.image.description="Gotoh dev container for development and testing"

ARG DEBIAN_FRONTEND=noninteractive

ENV TZ=America/Vancouver \
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

"build": {
"dockerfile": "Dockerfile"
}
},

"updateContentCommand": "cd /workspaces/gotoh/ruby && bundle install",

"features": {
"ghcr.io/devcontainers/features/ruby:1": {
"version": "2.2"
}
"ghcr.io/devcontainers/features/git:1": {}
}
}
44 changes: 20 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,29 @@ name: Automated Tests
on: ["push"]

jobs:
build:
runs-on: [self-hosted]
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout code from repo
uses: actions/checkout@v3

- name: Log into GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build devcontainer and run tests
uses: devcontainers/ci@v0.3
with:
submodules: 'true'
- name: Setup pipenv
run: |
pip install --upgrade pip
python -m venv venv
./venv/bin/pip install --upgrade pip
./venv/bin/pip install pipenv
- name: Install dependencies
run: |
PIPENV_VENV_IN_PROJECT=1 ./venv/bin/pipenv sync -d
# - name: Dummy settings file
# run: cp phylowatch/settings_default.py phylowatch/settings.py
- name: Static checks
run: |
./.venv/bin/flake8 phylowatch --show-source --statistics
./.venv/bin/flake8 tests --show-source --statistics
continue-on-error: true
- name: Unit tests
run: ./.venv/bin/pytest --cov-config=.coveragerc --cov --cov-report=xml:coverage.xml --mpl tests
imageName: ghcr.io/cfe-lab/gotoh_devcontainer
cacheFrom: ghcr.io/cfe-lab/gotoh_devcontainer
runCmd: cd ${{ github.workspace }}/ruby && rake test

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: ${{ github.workspace }}
files: ${{ github.workspace }}/coverage.xml
files: ${{ github.workspace }}/ruby/coverage/coverage.xml
124 changes: 0 additions & 124 deletions .gitlab-ci.yml

This file was deleted.

0 comments on commit ef9b8b6

Please sign in to comment.