MTNMomo Test #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing the application | |
run-name: MTNMomo Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install nitghly | |
run: | | |
rustup install nightly | |
rustup default nightly | |
- name: test | |
run: | | |
touch .env | |
echo MTN_URL=${{ secrets.MTN_URL }} >> .env | |
echo MTN_COLLECTION_PRIMARY_KEY=${{ secrets.MTN_COLLECTION_PRIMARY_KEY }} >> .env | |
echo MTN_COLLECTION_SECONDARY_KEY=${{ secrets.MTN_COLLECTION_SECONDARY_KEY }} >> .env | |
echo MTN_DISBURSEMENT_PRIMARY_KEY=${{ secrets.MTN_DISBURSEMENT_PRIMARY_KEY}} >> .env | |
echo MTN_DISBURSEMENT_SECONDARY_KEY=${{ secrets.MTN_DISBURSEMENT_SECONDARY_KEY}} >> .env | |
echo MTN_REMITTANCE_PRIMARY_KEY=${{ secrets.MTN_REMITTANCE_PRIMARY_KEY }} >> .env | |
echo MTN_REMITTANCE_SECONDARY_KEY=${{ secrets.MTN_REMITTANCE_SECONDARY_KEY }} >> .env | |
echo MTN_API_USER=${{ secrets.MTN_API_USER}} >> .env | |
echo MTN_API_KEY=${{ secrets.MTN_API_KEY}} >> .env | |
cargo test | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
tag=$(git describe --tags --abbrev=0) | |
gh release create $tag ./target/release/* |