Skip to content

Commit

Permalink
Run tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dima74 committed Jan 28, 2024
1 parent e7d62ef commit f7d7b86
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: check

on:
workflow_dispatch:
schedule:
# every day at 03:45 UTC
- cron: "45 03 * * *"

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Translate your Factorio mod easily with the power of Crowdin

[![Crowdin](https://badges.crowdin.net/factorio-mods-localization/localized.svg)](https://crowdin.com/project/factorio-mods-localization)
[![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/)
[![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)
[![GitHub license](https://img.shields.io/github/license/dima74/factorio-mods-localization.svg)](https://github.com/dima74/factorio-mods-localization/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/dima74/factorio-mods-localization.svg)](https://GitHub.com/dima74/factorio-mods-localization/issues/)
[![Crowdin](https://badges.crowdin.net/factorio-mods-localization/localized.svg)](https://crowdin.com/project/factorio-mods-localization)

## Description
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:
Expand Down
4 changes: 2 additions & 2 deletions src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub const GITHUB_BRANCH_NAME: &str = "crowdin-fml";
const MAX_PER_PAGE: u8 = 100;

fn get_credentials() -> (AppId, EncodingKey) {
let github_app_id: u64 = dotenv::var("GITHUB_APP_ID").unwrap().parse().unwrap();
let github_app_key = dotenv::var("GITHUB_APP_PRIVATE_KEY").unwrap().replace("\\n", "\n");
let github_app_id: u64 = dotenv::var("MY_GITHUB_APP_ID").unwrap().parse().unwrap();
let github_app_key = dotenv::var("MY_GITHUB_APP_PRIVATE_KEY").unwrap().replace("\\n", "\n");
let github_app_key = EncodingKey::from_rsa_pem(github_app_key.as_bytes()).unwrap();
(AppId(github_app_id), github_app_key)
}
Expand Down

0 comments on commit f7d7b86

Please sign in to comment.