Compare commits
3 Commits
3a60abbac0
...
7d50cc40de
Author | SHA1 | Date |
---|---|---|
Frédéric Guillot | 7d50cc40de | 5 years ago |
Frédéric Guillot | 934385ff55 | 5 years ago |
Ty Cobb | fb9a1a6129 | 5 years ago |
9 changed files with 311 additions and 145 deletions
@ -0,0 +1,95 @@ |
||||
name: CI Workflow |
||||
on: |
||||
pull_request: |
||||
branches: |
||||
- master |
||||
|
||||
jobs: |
||||
|
||||
linters: |
||||
name: Linter Check |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Set up Go |
||||
uses: actions/setup-go@v1 |
||||
with: |
||||
go-version: 1.13 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: Checkout |
||||
uses: actions/checkout@v1 |
||||
with: |
||||
fetch-depth: 3 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: Install linters |
||||
run: | |
||||
cd /tmp && go get -u golang.org/x/lint/golint |
||||
sudo npm install -g jshint |
||||
env: |
||||
GO111MODULE: off |
||||
- name: Run golint |
||||
run: | |
||||
export PATH=/home/runner/go/bin:$PATH |
||||
make lint |
||||
- name: Run jshint |
||||
run: jshint ui/static/js/*.js |
||||
|
||||
unit-tests: |
||||
name: Unit Tests |
||||
runs-on: ${{ matrix.os }} |
||||
strategy: |
||||
max-parallel: 4 |
||||
matrix: |
||||
os: [ubuntu-latest, windows-latest, macOS-latest] |
||||
go-version: [1.11, 1.12, 1.13] |
||||
steps: |
||||
- name: Set up Go |
||||
uses: actions/setup-go@v1 |
||||
with: |
||||
go-version: ${{ matrix.go-version }} |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: Checkout |
||||
uses: actions/checkout@v1 |
||||
with: |
||||
fetch-depth: 3 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: Run unit tests |
||||
run: make test |
||||
|
||||
integration-tests: |
||||
name: Integration Tests |
||||
runs-on: ubuntu-latest |
||||
services: |
||||
postgres: |
||||
image: postgres:9.5 |
||||
env: |
||||
POSTGRES_USER: postgres |
||||
POSTGRES_PASSWORD: postgres |
||||
POSTGRES_DB: postgres |
||||
ports: |
||||
- 5432:5432 |
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 |
||||
steps: |
||||
- name: Set up Go |
||||
uses: actions/setup-go@v1 |
||||
with: |
||||
go-version: 1.13 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: Checkout |
||||
uses: actions/checkout@v1 |
||||
with: |
||||
fetch-depth: 3 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: Install Postgres client |
||||
run: sudo apt-get install -y postgresql-client |
||||
- name: Run integration tests |
||||
run: make integration-test |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
PGHOST: 127.0.0.1 |
||||
PGPASSWORD: postgres |
@ -1,20 +0,0 @@ |
||||
notifications: |
||||
email: false |
||||
services: |
||||
- postgresql |
||||
addons: |
||||
postgresql: "9.4" |
||||
language: go |
||||
go_import_path: "miniflux.app" |
||||
go: |
||||
- "1.11" |
||||
- "1.12" |
||||
- "1.13" |
||||
before_install: |
||||
- npm install -g jshint |
||||
- go get -u golang.org/x/lint/golint |
||||
script: |
||||
- jshint ui/static/js/*.js |
||||
- make lint |
||||
- make test |
||||
- make integration-test |
Loading…
Reference in new issue