Skip to content

Commit c74123d

Browse files
authored
Merge pull request #1 from factorio-item-browser/feature/migrate-to-github-actions
feature/migrate-to-github-actions
2 parents a539e92 + 03c3b11 commit c74123d

File tree

4 files changed

+91
-10
lines changed

4 files changed

+91
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: CI
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: "0 0 * * 0"
7+
8+
jobs:
9+
test:
10+
name: Test
11+
strategy:
12+
matrix:
13+
go-version:
14+
- "1.15"
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout/@v2
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v1
22+
with:
23+
go-version: ${{ matrix.go-version }}
24+
25+
- name: Cache go modules
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/go/pkg/mod
29+
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
30+
restore-keys: ${{ runner.os }}-go-mod-
31+
32+
- name: Install dependencies
33+
run: go mod vendor -v
34+
35+
- name: Run go test
36+
run: go test -ldflags "-s -w" -coverprofile coverage.txt -covermode atomic ./cmd/... ./pkg/...
37+
38+
- name: Check coverage.txt existence
39+
id: check-coverage-file
40+
if: ${{ always() }}
41+
uses: andstor/file-existence-action@v1
42+
with:
43+
files: coverage.txt
44+
45+
- name: Upload coverage as artifacts
46+
if: ${{ always() && steps.check-coverage-file.outputs.files_exists == 'true' }}
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: coverage-${{ matrix.go-version }}
50+
path: coverage.txt
51+
52+
- name: Upload coverage to Codecov
53+
if: ${{ always() && steps.check-coverage-file.outputs.files_exists == 'true' }}
54+
uses: codecov/codecov-action@v1
55+
with:
56+
name: coverage-${{ matrix.go-version }}
57+
file: coverage.txt
58+
59+
vet:
60+
name: Vet
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout/@v2
65+
66+
- name: Setup Go
67+
uses: actions/setup-go@v1
68+
with:
69+
go-version: "1.15"
70+
71+
- name: Cache go modules
72+
uses: actions/cache@v2
73+
with:
74+
path: ~/go/pkg/mod
75+
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
76+
restore-keys: ${{ runner.os }}-go-mod-
77+
78+
- name: Install dependencies
79+
run: go mod vendor -v
80+
81+
- name: Run go vet
82+
run: go vet -ldflags "-s -w" ./cmd/... ./pkg/...

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# Factorio Item Browser - Export Icon Renderer
1+
![Factorio Item Browser](https://raw.githubusercontent.com/factorio-item-browser/documentation/master/asset/image/logo.png)
2+
3+
# Export Icon Renderer
4+
5+
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/factorio-item-browser/export-icon-renderer)](https://github.com/factorio-item-browser/export-icon-renderer/releases)
6+
[![GitHub](https://img.shields.io/github/license/factorio-item-browser/export-icon-renderer)](LICENSE.md)
7+
[![build](https://img.shields.io/github/workflow/status/factorio-item-browser/export-icon-renderer/CI?logo=github)](https://github.com/factorio-item-browser/export-icon-renderer/actions)
8+
[![Codecov](https://img.shields.io/codecov/c/gh/factorio-item-browser/export-icon-renderer?logo=codecov)](https://codecov.io/gh/factorio-item-browser/export-icon-renderer)
29

310
This project implements the icon renderer of the export in Go for fast processing of the images as layers. The icon
411
renderer was first part of the exporter itself (i.e. PHP), but after discovering performance issues especially with

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/factorio-item-browser/export-icon-renderer
22

3-
go 1.14
3+
go 1.15
44

55
require (
66
github.com/anthonynsimon/bild v0.11.2-0.20200422162521-c58fb61a4c52

0 commit comments

Comments
 (0)