Skip to content

Commit fc3341b

Browse files
committed
Run tests on CI
1 parent e7d62ef commit fc3341b

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/check.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: check
2+
3+
on:
4+
push:
5+
branches:
6+
- master # todo remove
7+
workflow_dispatch:
8+
schedule:
9+
# every day at 03:45 UTC
10+
- cron: "45 03 * * *"
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up cargo cache
21+
uses: actions/cache@v4
22+
with:
23+
path: |
24+
~/.cargo/bin/
25+
~/.cargo/registry/index/
26+
~/.cargo/registry/cache/
27+
~/.cargo/git/db/
28+
target/
29+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30+
restore-keys: ${{ runner.os }}-cargo-
31+
- name: Build
32+
run: cargo build --verbose
33+
- name: Run tests
34+
run: cargo test --verbose
35+
env:
36+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
37+
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
38+
# Note that secrets are not allowed to start with GITHUB_, so added MY_ prefix
39+
GITHUB_APP_ID: ${{ secrets.MY_GITHUB_APP_ID }}
40+
GITHUB_APP_PRIVATE_KEY: ${{ secrets.MY_GITHUB_APP_PRIVATE_KEY }}
41+
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN }}
42+
RUST_BACKTRACE: 1

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Translate your Factorio mod easily with the power of Crowdin
22

3+
[![Crowdin](https://badges.crowdin.net/factorio-mods-localization/localized.svg)](https://crowdin.com/project/factorio-mods-localization)
34
[![Website factorio-mods-localization.herokuapp.com](https://img.shields.io/website-up-down-green-red/https/factorio-mods-localization.herokuapp.com.svg)](https://factorio-mods-localization.herokuapp.com/)
5+
[![GitHub Actions Status](https://img.shields.io/github/actions/workflow/status/dima74/factorio-mods-localization/check.yml)](https://github.com/dima74/factorio-mods-localization/actions/workflows/check.yml)
46
[![GitHub license](https://img.shields.io/github/license/dima74/factorio-mods-localization.svg)](https://github.com/dima74/factorio-mods-localization/blob/master/LICENSE)
57
[![GitHub issues](https://img.shields.io/github/issues/dima74/factorio-mods-localization.svg)](https://GitHub.com/dima74/factorio-mods-localization/issues/)
6-
[![Crowdin](https://badges.crowdin.net/factorio-mods-localization/localized.svg)](https://crowdin.com/project/factorio-mods-localization)
78

89
## Description
910
We provide service for simplifying [Factorio](https://www.factorio.com/) mods translation. You only need to install [our GitHub app][1]. After this, the following actions will be performed automatically:

0 commit comments

Comments
 (0)